Boost logo

Boost Users :

From: Doug Henry (brilligent_at_[hidden])
Date: 2006-04-19 08:09:16


The best wrapper I have ever used for libxml2/libxslt is a lib called
xmlwrapp (now in sourceforge). It wraps both libxml and libxslt, provides
sax and tree parsers, and has an iterator style interface.

There are some possibly "hidden" advantages to using a complete library like
xmlwrapp/libxml2 that may not be needed in-the-moment, but downstream can
save huge amounts of time. First, most xml parsers only read xml, they have
no capability to store and produce xml. At first blush this doesn't seem
important, but it is fairly easy to produce invalid xml if your just
printf-ing out xml formatted data. Second, libxml2 integrates with libxslt,
which gives you access to APIs for applying transforms to in memory xml.
This ability (lacking in most libs) can prove invaluable.

On 4/18/06, Tomas Puverle <Tomas.Puverle_at_[hidden]> wrote:
>
> > > ... Libxml2 is generaly faster than
> > > expat.
> >
> > Is your assessment based on experience? Just curious. I have used expat
> for
> > several years and I would be really interested if libxml2 can do the job
> > faster.
>
> Yes, we test and run a lot of benchmarks on a lot of different XML parsers
> (including some not generally available). Libxml used to be a touch
> slower
> than expat but libxml2 is faster in both the SAX2 mode and when used as a
> pull
> parser.
> Also, there are some new interfaces in libxml2 that allow you to minimize
> the
> amount of string copying and allocation, which futher enhances its
> advantage.
>
> Tom
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net