News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Xerces and code::blocks

Started by Anonymous, July 10, 2005, 10:52:37 PM

Previous topic - Next topic

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.
Be patient!
This bug will be fixed soon...

Anonymous

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

mandrav

Quote from: AnonymousWhat is that?
Is there XML parser that you can easily use with Code::Blocks?
Thanks.
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.
Be patient!
This bug will be fixed soon...

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/

Anonymous

Thanks for the answer.
I'll try this expat .
I dont not need really the parser. I'm in pre stage of a little project and I'm going round possible tools to achieve things.
The project is tiny but I might go as well for a data base like mysql or interbase. If I really need xerces parser, I'll repost. Thanks for the offer.

mandrav

What I meant by really *needing* the parser, was that if you 're sure you need all this extra functionality.
We use TinyXML in Code::Blocks and it works like a charm. But then again we don't need anything bigger/fancier...

Yiannis.
Be patient!
This bug will be fixed soon...

per_eckerdal

Quote from: AnonymousThe project is tiny but I might go as well for a data base like mysql or interbase. If I really need xerces parser, I'll repost. Thanks for the offer.

If the project is small, I wouldn't go for huge projects as MySQL. I recommend a look at http://www.sqlite.org/. (If your app is server-based, MySQL *could* be useful, but normally it's simply to much hassle to install MySQL "just for this small app".. SQLite is also easier to set up and manage.)
/Per Eckerdal

David Perfors

there is also an wx port for sqlite, wxsqlite, don't know the link :)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

per_eckerdal

http://wxsqlite.sourceforge.net/
(even though I hadn't heard of it before)
/Per Eckerdal

Anonymous

Works wonders, even though I was in pain for compiling but it is not nothing new here. I 'm really too bad at that.

I'm in writing a wrapper to perform the usual tasks, much more comfortable task for me.

Thanks for the piece of advice.