12 #ifdef HAVE_TEUCHOS_EXPAT
16 using namespace Teuchos;
18 void expatStartElementHandler(
void* handler,
20 const XML_Char** attr)
24 std::string tag = name;
30 for (
int i=0; attr[i] != 0; i+=2)
32 std::string key = attr[i];
33 std::string val = attr[i+1];
34 attributes[key] = val;
40 void expatEndElementHandler(
void* handler,
45 std::string tag = name;
50 void expatCharacterDataHandler(
void* handler,
54 char* str =
new char[len+1];
59 std::string chars = str;
66 #endif // HAVE_TEUCHOS_EXPAT
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.
void startElement(const std::string &tag, const Map &attributes)
Receive notification of the start of an element.
Expat adapter for the TreeBuildingXMLHandler.
TreeBuildingXMLHandler assembles a XMLObject from your XML input.