Author Topic: Xerces and code::blocks  (Read 10332 times)

Anonymous

  • Guest
Xerces and code::blocks
« on: July 10, 2005, 10:52:37 pm »
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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Xerces and code::blocks
« Reply #1 on: July 11, 2005, 12:22:31 am »
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

  • Guest
Xerces and code::blocks
« Reply #2 on: July 11, 2005, 08:20:24 am »
What is that?
Is there XML parser that you can easily use with Code::Blocks?
Thanks.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Xerces and code::blocks
« Reply #3 on: July 11, 2005, 08:42:22 am »
Quote from: Anonymous
What 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

  • Guest
Xerces and code::blocks
« Reply #4 on: July 11, 2005, 08:57:26 am »
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

  • Guest
Xerces and code::blocks
« Reply #5 on: July 11, 2005, 02:43:22 pm »
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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Xerces and code::blocks
« Reply #6 on: July 11, 2005, 02:56:32 pm »
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

  • Guest
Xerces and code::blocks
« Reply #7 on: July 11, 2005, 03:07:34 pm »
Quote from: Anonymous
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.


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

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Xerces and code::blocks
« Reply #8 on: July 11, 2005, 03:57:34 pm »
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

  • Guest
Xerces and code::blocks
« Reply #9 on: July 11, 2005, 04:00:51 pm »
http://wxsqlite.sourceforge.net/
(even though I hadn't heard of it before)
/Per Eckerdal

Anonymous

  • Guest
Xerces and code::blocks
« Reply #10 on: July 12, 2005, 11:22:22 pm »
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.