C++ libraries: Xerces, libxml/libxml++ or perhaps Arabica?

O

Olav

I need to do some cross-platform XML in C++.

Previously I have used Xerces, but some Googeling indicated that many
people prefer libxml. Also it is UTF-8, which is easier for us
(Xerces is UTF-16) . So I decided to use libxml++ for my prototype.

On Windows it took much longer to set up than Xerces, had to find some
obscure DLLs before it would run, Got a GPF at a point, and did the
rest of the prototype in Xerces.

*libxml++ seems to be a "one-man show".

*Strings are std:string. Is that a disadvantage when you want *char?

*The C++ libraries seems to be less developed and documented.

*To C++ developers. Do you use libxml++ or pure libxml? Is it a big
disadvantage to work with the pure C version or mix the two.

*libxml seems to score better on XPath/XSLT, but that's a bit in the
future for us.


******************************************************************
Then I read about ARABICA, which seems to have only good critics.
It also seems to be a "one-man show" though.

*What do you think?

This project is actually Windows 2000 (but code should be
cross-platform).

*I would think that Arabica on top of msxml would have a very light
footprint?

*What would be the difference with a pure Microsoft solution? Guess
they also conform to standards?

*Is msxml always there on Windows 2000?

Thanks
Olav
 
M

Michael Sweet

Olav said:
I need to do some cross-platform XML in C++.

What are your requirements? i.e. what are you using it for, and
what kinds of manipulations/lookups will you need to do with the
XML data?
...
*Strings are std:string. Is that a disadvantage when you want *char?

You just call the c_str() method to get a char *; that can reduce
performance for some apps, but it isn't a hard thing to do...
*The C++ libraries seems to be less developed and documented.

*To C++ developers. Do you use libxml++ or pure libxml? Is it a big
disadvantage to work with the pure C version or mix the two.

I currently don't use any of the libxml/xml++/xml2 libraries; they
are much too large and complicated for the things I do.

<blatent-plug>

Instead, I use my Mini-XML library (http://www.easysw.com/~mike/mxml)
which is a pure C library and is several orders of magnitude smaller
than libxml and friends. It isn't a full validating parser, but it
does support UTF-8 and (in 2.0) UTF-16 input and UTF-8 output and
lets you know if you try to load a non-conforming file. You can
search and update the XML document tree, and 2.0 adds indexes so
you can do really fast searches. The code itself is portable to
anything but OS/400 (which uses EBCDIC) and I am even including
Visual C++ project files in 2.0 (they aren't in 2.0rc1, but let
me know if you want them sooner than tomorrow... :)

It is a "one-man show" type of library, however I use this library
for all of the software my company produces, and several other
projects are using it, so I doubt it will disappear anytime soon.

I've pondered doing a C++ version, but so far the benefits aren't
large enough for me to do the port. The implementation is simple
enough that a direct conversion to C++ would be trivial and a
STL-style conversion nearly as trivial.

*libxml seems to score better on XPath/XSLT, but that's a bit in the
future for us.

Is that an eventual requirement?
 
O

Olav

Michael Sweet said:
What are your requirements? i.e. what are you using it for, and
what kinds of manipulations/lookups will you need to do with the
XML data?

What we need now is DOM, no validation. But we want something we can
grow with and/or conform to standards (so we can switch it out).
Therefore I am (so far) only really considering libxml++, Xerces and
Arabica.

About UTF-nn, I am mainly thinking of the string-type in the API
(seems you are thinking of the file-encoding).

Actually the most likely if we get other languages than English is
8bit code-pages.

Thanks!
Olav
 
L

liscerq

Hi,

Reading your first post I saw exactly the same description of the
doubts i have now: I have been trying to decide between Xerces and
libxml2 ++, but until now i could just get Xerces working :/

libxml2 ++ seems to be more complicated, for instance for DOM support;
the schema is partially implemented in libxml2; its API is not so
extense like libxml...

My programming environment is Visual Studio C++ 6
Could you tell to which conclusion did you get?

Thank you,
Elisabete.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top