12#ifdef HAVE_TEUCHOS_LIBXML2
19void xmlSAX2StartElement(
void* handler,
25 std::string tag = (
const char*) name;
26 Teuchos::map<std::string, std::string> attributes;
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;
41void xmlSAX2EndElement(
void* handler,
46 std::string tag = (
const char*) name;
51void xmlSAX2CharacterData(
void* handler,
55 char* str =
new char[len+1];
56 strncpy(str, (
const char*) s, len);
60 std::string chars = str;
libxml2 adapter for the TreeBuildingXMLHandler
Templated Parameter List class.
Defines a class for assembling an XMLObject from XML input.
TreeBuildingXMLHandler assembles a XMLObject from your XML input.
void characters(const std::string &chars)
Process character data.
void startElement(const std::string &tag, const Map &attributes)
Receive notification of the start of an element.
int endElement(const std::string &tag)
Receive notification of the end of an element.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...