mail-ng
[Top] [All Lists]

Re: a few short notes

2004-02-03 01:16:47

On 3-feb-04, at 1:08, Paul Robinson wrote:

It's a text string. It's de-limited with tags. Tags are text surrounded by < and >. Sometimes they have /, " and = characters in them that change the way to treat either the tag, or the data inside the tag.

That's it. It's BECAUSE of the incredibly strict rules you have to follow that it is easy to write tools that handle XML.

If you can't write something like the above in say 12-20 lines, plus standard #include'ed files in C (stdio.h), perhaps you'd like to consider hiring me as a consultant? :-)

I wrote a program in C that takes a Netscape bookmark file and stores the content in a database. This is just under 300 lines and it's pretty stupid, it certainly can't handle all variations of HTML.

It could be lack of programming prowess on my part, but I find parsing HTML / XML syntax incredibly inconvenient. The most troubleshome part is that you can't just work left to right, you have to look for close tags and so on.

Also, it just doesn't make any sense.

Why is it <input type=blah> but <title>blah</title> ? Something like input="blah" title="blah" would be much better.


<Prev in Thread] Current Thread [Next in Thread>