I think that you would have a better time with expat. Also, I have
used a library from Dan Connolly to generate a real XML parser. Try
"http://lists.w3.org/Archives/Public/www-archive/2002May/0002.html".
I doubt you want this unless you are parsing machine generated XML and
you have a fixed DTD.
I was parsing HTML (actually xHTML-basic) and I just constructed a
lexer (scanner) that would give expat like call backs. I think that
this is better than the tree like DOM structure of Xerces and the code
is certainly much lighter. I think we did port Xerese and it was
several megabytes on an ARM platform. The Yacc parser referenced
about (DOM like) was about 400k and the final scanner based
implementation was well under 100k (26k?).
1. A parser classifies things in a hierarchy.
2. A scanner just divides input into chunks.
Bison and Yacc are tools for generating parsers.
Flex and lex are tools for generating parsers.
A DOM model (full parsing of XML) is far more powerful but it is
generally huge! The expat is also fairly huge as it has some extra
features that most people don't need. You probably only need to
handle this,
<TAG attribute=value>Contained data &escape; < </TAG>
<EMPTY/>
<?ignore>
<!-- comment -->
<!ignore>
You pass a bunch of callbacks to the parer and it sends back tags (and
attribute value pairs), body text, end tags.
You really didn't specify what kind of application you had, so it is
difficult to know if this will suit you.
hth,
Bill Pringlemeir.
--
``C Code. C code run. Run, code, run... PLEASE!!!'' - Barbara Tongue
vxWorks FAQ, "http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html"
We succesfully use libxml on vxWorks.
Greg
Hi Greg,
Does libxml run on VxWorks "out-of-the-box" or did you port it to
VxWorks?
Do you know how much ROM & RAM is typically used by libxml?
Robin
Hi Greg,