TiXmlElement* elem = document->FirstChildElement("book"); const char* author = elem->Attribute("author");
TiXmlElement* elem = new TiXmlElement("person"); elem->SetAttribute("name", "John");
TiXmlElement* elem = document->FirstChildElement("student"); int age; elem->Attribute("age", &age);In this example, we are accessing the "student" element's "age" attribute and storing its integer value in the variable "age". Overall, TiXmlElement is a useful class for accessing and modifying XML attributes in C++. It is part of the TinyXML library.