Xerces

Xerces is a set of Apache Software Foundation libraries for parsing, validating, serializing, and manipulating XML. It implements both DOM and SAX.

The Apache Xerces project ships implementations for multiple languages, most notably Xerces-C++ and Xerces-J (Java). Depending on the binding, Xerces can validate documents against DTDs, XSD, and other schema languages, in addition to parsing and serializing XML content. Xerces-J has historically served as a widely used reference DOM/SAX implementation bundled inside Java runtimes and application servers.

Maintained byApache Software Foundation (Apache Xerces project)
ImplementsDOM and SAX
VariantsXerces-C++, Xerces-J (Java)
CapabilitiesParsing, schema validation, serialization, and manipulation of XML
LicenseApache License 2.0

#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/util/PlatformUtils.hpp>

XERCES_CPP_NAMESPACE_USE

int main() {
    XMLPlatformUtils::Initialize();

    XercesDOMParser parser;
    parser.parse("books.xml");
    DOMDocument* doc = parser.getDocument();

    XMLPlatformUtils::Terminate();
    return 0;
}