Is there any good way (and a simple way too) using Boost to read and write XML files?
I can't seem to find any simple sample to read XML files using Boost. Can you point me a simple sample that uses Boost for reading and writing XML files?
If not Boost, is there any good and simple library to read and write XML files that you can recommend? (it must be a C++ library)
Best Answer
You should Try pugixml Light-weight, simple and fast XML parser for C++
The nicest thing about pugixml is the XPath support, which TinyXML and RapidXML lack.
Quoting RapidXML's author "I would like to thank Arseny Kapoulkine for his work on pugixml, which was an inspiration for this project" and "5% - 30% faster than pugixml, the fastest XML parser I know of" He had tested against version 0.3 of pugixml, which has reached recently version 0.42.
Here is an excerpt from pugixml documentation:
The main features are:
Okay, you might ask - what's the catch? Everything is so cute - it's small, fast, robust, clean solution for parsing XML. What is missing? Ok, we are fair developers - so here is a misfeature list: