14 #ifdef HAVE_TEUCHOS_EXPAT
16 # define EXPAT_BUFSIZE 8192
21 using namespace Teuchos;
26 #ifdef HAVE_TEUCHOS_EXPAT
30 XML_Parser parser = XML_ParserCreate(NULL);
32 XML_SetElementHandler(parser, expatStartElementHandler,
33 expatEndElementHandler);
35 XML_SetCharacterDataHandler(parser, expatCharacterDataHandler);
37 XML_SetUserData(parser, (
void*) &(*handler));
42 unsigned int bufsize = EXPAT_BUFSIZE;
43 unsigned char buf[EXPAT_BUFSIZE];
47 unsigned int nRead = s->
readBytes(buf, bufsize);
52 XML_Parse(parser, (
char*) buf, bufsize, done);
61 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...