XML consideration. [Was Re: a few short notes]
"Hector Santos" <[email protected]>
| Newsgroups | gmane.mail.ng |
|---|---|
| Organization | Santronics Software, Inc |
| Message-ID | <010501c3ea3a$31c87790$6401a8c0@FAMILY> |
----- Original Message ----- From: "Iljitsch van Beijnum" <[email protected]> To: "Paul Robinson" <[email protected]> Cc: <[email protected]> Sent: Tuesday, February 03, 2004 3:16 AM Subject: Re: a few short notes > > 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. > You raise a good point for simplicity, but allowing the experts to offer the tools for you to this better is the way to go about it. :-) I personally think XML can be used as a protocol/network control "wrapper" for a data/format independent transport system. I don't think it is appropriate to use it for the MAIL data component itself for the basic reason that it imposes presentation and data processing related issues. As a side note: There are many XML parsers out there. Off hand, there is a public domain light weight XML parser called PUGXML, very popular. It is written for portability using ANSI C/C++. It is a single pugxml.h header file and it has over 2500 lines of nicely written C++ class object code. We are starting to use it ourselves. I'll be interested to know how this compiles under a *nix system. You can google PUGXML and find the header and information about it. The help file is written in Windows Help format, so I don't know if that will help you. The documentation is pretty good I think. -- Hector Santos, Santronics Software, Inc. http://www.santronics.com