#include "tinyxml.h" TiXmlElement* element = ... // get the XML element const char* nameVal = element->Attribute("name");
#include "rapidxml.hpp" rapidxml::xml_node<>* element = ... // get the XML element const char* nameVal = element->first_attribute("name")->value();
#include "pugixml.hpp" pugi::xml_node element = ... // get the XML element const char* nameVal = element.attribute("name").value();In each of these examples, 'nameVal' will contain the value of the 'name' attribute for the XML element.