User forums > Help

Xerces and code::blocks

(1/3) > >>

Anonymous:
Hello

I want to learn how to use the xerces parser and I downloaded a sample to try to compile it, using the files in the code::blocs dependencies.

What do I need more to compile using xerces?

Thank you.

mandrav:
Xerces needs quite a bit of hacking, to make it compile without the autoconf/automake tools.
At least the version I tried...

Yiannis.

Anonymous:
What is that?
Is there XML parser that you can easily use with Code::Blocks?
Thanks.

mandrav:

--- Quote from: Anonymous ---What is that?
Is there XML parser that you can easily use with Code::Blocks?
Thanks.
--- End quote ---

Yes, TinyXML :lol:

It really depends what you 're after. Xerces is a full-fledged XML parser/validator/whatnot.
If you really *need* Xerces, I suppose I could make a diff for you with the changes I had to make to compile it in C::B.

Yiannis.

darklordsatan:
Likely, you need to be aware there are 2 kinds of ways to parse an XML file; DOM or SAX
DOM (Document Object Model) parsers usually create a "tree" in memory as they read the contents of the XML, thus, they are memory intensive. Then when the parsing is done, you can retrieve the data from the already present buffer (tree) in memory.
Sax (Simple API for XML) parsers work by means of callbacks, i.e you register event handlers, and then, as the XML is being read, your function gets called, so, you only use the required memory, and retrieve only the elements/attributes you need and not the whole XML tree.

TinyXML is a DOM parser. Xerces-C is both SAX and DOM, and its more complex but has more features.
Theres another good one I've used with mingw (so it should work flawlessly with code::blocks provided you use that compiler suite too) is expat, which follows a SAX approach

http://expat.sourceforge.net/

Navigation

[0] Message Index

[#] Next page

Go to full version