Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > C++ libraries: Xerces, libxml/libxml++ or perhaps Arabica?

Reply
Thread Tools

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

 
 
Olav
Guest
Posts: n/a
 
      06-21-2004
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
 
Reply With Quote
 
 
 
 
Michael Sweet
Guest
Posts: n/a
 
      06-21-2004
Olav wrote:
> 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.

</blatent-plug>

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


Is that an eventual requirement?

--
__________________________________________________ ____________________
Michael Sweet, Easy Software Products mike at easysw dot com
Printing Software for UNIX http://www.easysw.com
 
Reply With Quote
 
 
 
 
Olav
Guest
Posts: n/a
 
      06-21-2004
Michael Sweet <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Olav wrote:
> > 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?


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
 
Reply With Quote
 
liscerq@gmx.ch
Guest
Posts: n/a
 
      01-20-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webserver, perhaps... Eduardo Rosa ASP .Net 2 09-02-2004 01:58 PM
Perhaps a newbie question... Klaus Kleiner VHDL 8 12-23-2003 05:30 PM
perhaps better than nat with enough IPs Brian Bergin Cisco 2 11-11-2003 04:45 PM
perhaps, this question is about ICS direstraits MCSE 0 08-22-2003 03:51 PM
Perhaps an XML file might do this trick? Stephajn Craig ASP .Net 1 06-26-2003 05:30 PM



Advertisments