When comparing RapidXML vs pugixml, the Slant community recommends pugixml for most people. In the question“What are the best XML parser/generator libraries for C++?” pugixml is ranked 2nd while RapidXML is ranked 3rd. The most important reason people chose pugixml is:
This allows all characters to be used and read/written in the DOM tree.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Header-only implementation
This allows for a very simple integration process of the parser into your code. Only the .hpp file would need to be included into the library.
Pro Very fast parsing speed
"... parsing speed is about 50-100x faster than Xerces DOM, 30-60x faster than TinyXml, 3-12x faster than pugxml, and about 5% - 30% faster than pugixml"
Pro Allows modification of the DOM tree
The DOM tree that is created from the parser is fully modifiable. Nodes and attributes can be added/removed, and their contents changed.
Pro Full Unicode support
This allows all characters to be used and read/written in the DOM tree.
Pro XPath support
XPath 1.0 implementation for complex data-driven tree queries. XPath allows for navigation by selecting nodes from the XML.
Cons
Con Not W3C compliant
Ignoring DOCTYPE declarations causes RapidXML to not be a W3C compliant parser. Though it can still successfully parse and produce complete trees of all valid XML files.
Con Non-validating
The parser will not check the validation rules in the DTD or schema. Only syntax will be checked.