The Cat in the Hat Dr. Seuss 1957 The Great Gatsby F. Scott Fitzgerald 1925
#include "tinyxml2.h" #includeIn this example, we load the XML document from a file using the LoadFile function, then access the first child element of the root element (using namespace tinyxml2; int main() { XMLDocument doc; doc.LoadFile("books.xml"); XMLElement* bookstore = doc.FirstChildElement("bookstore"); XMLElement* firstBook = bookstore->FirstChildElement("book"); std::cout << "First book: " << firstBook->Attribute("title") << std::endl; return 0; }