46 #ifdef HAVE_TEUCHOS_EXPAT
48 # define EXPAT_BUFSIZE 8192
53 using namespace Teuchos;
58 #ifdef HAVE_TEUCHOS_EXPAT
62 XML_Parser parser = XML_ParserCreate(NULL);
64 XML_SetElementHandler(parser, expatStartElementHandler,
65 expatEndElementHandler);
67 XML_SetCharacterDataHandler(parser, expatCharacterDataHandler);
69 XML_SetUserData(parser, (
void*) &(*handler));
74 unsigned int bufsize = EXPAT_BUFSIZE;
75 unsigned char buf[EXPAT_BUFSIZE];
79 unsigned int nRead = s->
readBytes(buf, bufsize);
84 XML_Parse(parser, (
char*) buf, bufsize, done);
93 return parser.
parse();
Defines a class for assembling an XMLObject from XML input.
XMLObject parse()
Consume the XMLInputStream to build an XMLObject.
XMLParser consumes characters from an XMLInputStream object, parsing the XML and using a TreeBuilding...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
Expat adapter for the TreeBuildingXMLHandler.
const XMLObject & getObject() const
Retrieve the entire XML tree.
TreeBuildingXMLHandler assembles a XMLObject from your XML input.
Smart reference counting pointer class for automatic garbage collection.
A class providing a simple XML parser. Methods can be overloaded to exploit external XML parsing libr...