#includeusing namespace CXBMCTinyXML; int main() { // Load the XML file TiXmlDocument doc("config.xml"); doc.LoadFile(); // Get the root element TiXmlElement* root = doc.RootElement(); // ... return 0; }
#includeThis example demonstrates how to create a new XML document and add a root element to it using CXBMCTinyXML. Package/Library: CXBMCTinyXML is part of the XBMC media center project.using namespace CXBMCTinyXML; int main() { // Create a new XML document TiXmlDocument doc; // Create the root element TiXmlElement* root = new TiXmlElement("config"); doc.LinkEndChild(root); // ... // Save the XML document doc.SaveFile("config.xml"); return 0; }