When comparing pugixml vs Xerces-C++, the Slant community recommends Xerces-C++ for most people. In the question“What are the best XML parser/generator libraries for C++?” Xerces-C++ is ranked 1st while pugixml is ranked 2nd. The most important reason people chose Xerces-C++ is:
Xerces has many applications and libraries that give additional functionality to the parser. XQilla, for example, allows for XQuery and XPath implementation.
Ranked in these QuestionsQuestion Ranking
Pros
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.
Pro Additional libraries and applications
Xerces has many applications and libraries that give additional functionality to the parser. XQilla, for example, allows for XQuery and XPath implementation.
Pro Validation support
Allows the validation of XML corresponding to the DTD or schema rules linked.
Pro Full Unicode support
This allows all characters to be used and read/written in the DOM tree.
Pro DOM/SAX compliant
Xerces-C++ comes packaged with the API documentation for SAX and DOM. These are two of the most highly used programming interfaces with XML.
Implementation of SAX 1.0/2.0 specification.
Implementation of DOM 1.0, 2.0 (Core, Traversal and Range), and 3.0 (Core, Load and Save) specification.
Cons
Con Non-validating
The parser will not check the validation rules in the DTD or schema. Only syntax will be checked.
Con Overkill for simple needs
If a website only uses a small number of XML, that can easily be handled manually, Xerces-C++ may be considered overkill. All the validation and compliance may not be necessary.