tinyxml2

C++ XML parser library with improved memory efficiency

brewmacoslinux
Try with needOr install directly
Source

About

Improved tinyxml (in memory efficiency and size)

Examples

parse XML file and extract data in C++ code$ // #include <tinyxml2.h> // tinyxml2::XMLDocument doc; // doc.LoadFile("file.xml");
read and modify XML configuration files programmatically$ // tinyxml2::XMLElement* root = doc.RootElement(); // const char* value = root->Attribute("key");
create and write new XML documents from scratch$ // tinyxml2::XMLDocument doc; // tinyxml2::XMLElement* root = doc.NewElement("root"); // doc.InsertFirstChild(root); // doc.SaveFile("output.xml");
validate and process large XML files with low memory usage$ // Link against libtinyxml2.a or libtinyxml2.so // Compile with: g++ -o app app.cpp -ltinyxml2
iterate through XML elements and attributes in C++$ // for (tinyxml2::XMLElement* child = root->FirstChildElement(); child; child = child->NextSiblingElement()) { ... }