I was surprised not to find an XML parser/generator library in boost. Or is it hidden somewhere? Is it planned for a future release, perhaps? In the meantime, can anyone recommend another open source C++ XML library I can use (with DOM parser)? Thanks! -- Michiel Helvensteijn
Michiel Helvensteijn wrote:
I was surprised not to find an XML parser/generator library in boost. Or is it hidden somewhere?
Is it planned for a future release, perhaps?
In the meantime, can anyone recommend another open source C++ XML library I can use (with DOM parser)?
Thanks!
Not sure of any future boost plans for an XML library - seems a little specific to me though. You can always try apache xerces-c: http://xerces.apache.org/xerces-c/
Not sure of any future boost plans for an XML library - seems a little specific to me though.
Aren't there already more specific libraries in boost? Like Python and Spirit? Anyway, it seems quite useful to me.
You can always try apache xerces-c: http://xerces.apache.org/xerces-c/
On first sight it looks a bit heavyweight. But I'll take a closer look later. Thanks. (Zeljko as well.) -- Michiel Helvensteijn
On Sat, Jul 26, 2008 at 03:44:54PM +0200, Michiel Helvensteijn wrote:
In the meantime, can anyone recommend another open source C++ XML library I can use (with DOM parser)?
Hi Michiel, Michiel Helvensteijn wrote:
I was surprised not to find an XML parser/generator library in boost. Or is it hidden somewhere?
Is it planned for a future release, perhaps?
In the meantime, can anyone recommend another open source C++ XML library I can use (with DOM parser)?
Thanks!
From personal experience I'd suggest to use libxml2 . It's quite portable and under an MIT license, hence there are practically no restrictions to the environment you want to use it in.
If it is persistence and/or serialization you're after, have a look at Robert Ramey's serialization library, part of Boost. Among other representations, classes can also be transformed into XML (and of course vice versa) with it. I've used libxml2 in the past to do my own serialization framework but find Robert's library to be generally far more usable (and, in a way, standard) ;-) Best Regards, Ruediger
In the meantime, can anyone recommend another open source C++ XML library I can use (with DOM parser)?
I recommend using POCO (Portable Components). It is a portable and very powerful open source C++ library that includes an XML DOM parser. You can find it here: http://pocoproject.org/ Best regards, Peter.
Hi there, regarding POCO: I was wondering whether it wouldn't make sense for the POCO and Boost groups to cooperate more closely ? Some of the work done for both library collections is redundant - e.g. both have smart pointers and threads. And some of the other libraries complement each other. Plus, POCO is also delivered under the Boost license and is portable. Are there contacts between the core development groups ? Well, ob course the above is just my "user's perspective". I realise that actually merging two long-standing projects will be a bit of a problem. Best, Ruediger Peter Klotz wrote:
In the meantime, can anyone recommend another open source C++ XML library I can use (with DOM parser)?
I recommend using POCO (Portable Components). It is a portable and very powerful open source C++ library that includes an XML DOM parser.
You can find it here:
Best regards, Peter.
Kind Regards / Mit freundlichen Gruessen, Ruediger Berlich /*************************************************************************/ The Steinbuch Centre for Computing of Karlsruhe Institute of Technology (the Cooperation of Forschungszentrum Karlsruhe GmbH and Universitaet Karlsruhe TH) will run its annual GridKa School from September 8th to 12th, 2008. Please find further information at http://www.fzk.de/gks08 . /*************************************************************************/
On Sat, Jul 26, 2008 at 6:44 AM, Michiel Helvensteijn
I was surprised not to find an XML parser/generator library in boost. Or is it hidden somewhere?
The property_tree library (which is in the boost trunk, but not in the release IIRC) does a decent job parsing simple XML files, and has a very nice, straightforward interface. It uses rapidXML internally. The docs are at: http://kaalus.atspace.com/ptree/doc/index.html And a recent thread on the library status: http://lists.boost.org/Archives/boost/2008/03/134104.php Stjepan
Andy wrote:
Not sure of any future boost plans for an XML library - seems a little specific to me though.
An XML parsing library is needed in boost it's got my vote. I have and currently using xerces and looked at extending boost::serialization to provide xml with DTD validation. Not something serialization does. I found boost::serialization to be somewhat difficult to extend and asked that a clear path to extending serialization be provided. I think a front end / back end approach to these and other libraries (xerces, libxml, rapidXML) should be supported in boost allowing the developer to choose which implementation is used on the back end. This will mean that the front end interface will have to provide all features and notifications of what features are and are not provided by the back end. I used xerces and boost::function boost::bind to allow callbacks from Xerces and tried to hide as much of the implementation of xerces from the interface. I was using SAX2 not DOM, but xerces supports both. Light weight and XML should not be used in the same sentence. There is no light weight XML implementation that is standards conforming. If it is light weight it lacks features, if it does not lack features it is heavy weight. These two are inversely proportional when talking about XML. And once we get XML then we will want the holy grail of XML which is an XSLT transformer. Heck at least I want one. Get ready to have boat loads of fun with wide char conversions and Unicode! Brian
Thanks for all the answers. :-) It seems I'll have plenty of options. I'll go for one of the lighter libraries, because the XML is only a small part of a small feature in my project. -- Michiel Helvensteijn
Hello
"MH" == Michiel Helvensteijn writes: MH> I was surprised not to find an XML parser/generator library in MH> boost. Or is it hidden somewhere?
MH> Is it planned for a future release, perhaps? MH> In the meantime, can anyone recommend another open source C++ XML MH> library I can use (with DOM parser)? I can recommend Arabica XML library - http://www.jezuk.co.uk/cgi-bin/view/arabica -- it provide unified interface on top of existing libraries -- With best wishes, Alex Ott, MBA http://alexott.blogspot.com/ http://xtalk.msk.su/~ott/ http://alexott-ru.blogspot.com/
participants (8)
-
Alex Ott
-
andy@cybersoftcentral.com
-
Brian Davis
-
Michiel Helvensteijn
-
Peter Klotz
-
Ruediger Berlich
-
Stjepan Rajko
-
Zeljko Vrba