44 #ifdef HAVE_TEUCHOS_LIBXML2
49 using namespace Teuchos;
51 void xmlSAX2StartElement(
void* handler,
57 std::string tag = (
const char*) name;
63 for (
int i=0; attr[i] != 0; i+=2)
65 std::string key = (
const char*) attr[i];
66 std::string val = (
const char*) attr[i+1];
67 attributes[key] = val;
73 void xmlSAX2EndElement(
void* handler,
78 std::string tag = (
const char*) name;
83 void xmlSAX2CharacterData(
void* handler,
87 char* str =
new char[len+1];
88 strncpy(str, (
const char*) s, len);
92 std::string chars = str;
void characters(const std::string &chars)
Process character data.
Defines a class for assembling an XMLObject from XML input.
int endElement(const std::string &tag)
Receive notification of the end of an element.
libxml2 adapter for the TreeBuildingXMLHandler
Templated Parameter List class.
void startElement(const std::string &tag, const Map &attributes)
Receive notification of the start of an element.
TreeBuildingXMLHandler assembles a XMLObject from your XML input.