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

Discussion in 'XML' started by Olav, Jun 21, 2004.

  1. Olav

    Olav Guest

    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
     
    Olav, Jun 21, 2004
    #1
    1. Advertising

  2. 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
     
    Michael Sweet, Jun 21, 2004
    #2
    1. Advertising

  3. Olav

    Olav Guest

    Michael Sweet <> wrote in message news:<>...
    > 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
     
    Olav, Jun 21, 2004
    #3
  4. Olav

    Guest

    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.
     
    , Jan 20, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Gregory
    Replies:
    1
    Views:
    509
  2. Olav
    Replies:
    0
    Views:
    350
  3. Olav
    Replies:
    1
    Views:
    421
    Martin Honnen
    Aug 11, 2004
  4. cvissy
    Replies:
    0
    Views:
    609
    cvissy
    Nov 16, 2004
  5. Karsten Wutzke
    Replies:
    21
    Views:
    921
    Roedy Green
    Jun 29, 2007
Loading...

Share This Page