12 #ifdef HAVE_TEUCHOS_LIBXML2
17 using namespace Teuchos;
19 void xmlSAX2StartElement(
void* handler,
25 std::string tag = (
const char*) name;
31 for (
int i=0; attr[i] != 0; i+=2)
33 std::string key = (
const char*) attr[i];
34 std::string val = (
const char*) attr[i+1];
35 attributes[key] = val;
41 void xmlSAX2EndElement(
void* handler,
46 std::string tag = (
const char*) name;
51 void xmlSAX2CharacterData(
void* handler,
55 char* str =
new char[len+1];
56 strncpy(str, (
const char*) s, len);
60 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.