14 using namespace Teuchos;
17 : root_(), current_(), path_()
25 "TreeBuildingXMLHandler::trying to add content to an empty node");
29 if(chars.compare(
"\n")==0) {
46 const Map& attributes)
60 for (Map::const_iterator i=attributes.begin(); i != attributes.end(); ++i)
62 const std::string& key = (*i).first;
63 const std::string& val = (*i).second;
const std::string & getTag() const
Return the tag of the current node.
void characters(const std::string &chars)
Process character data.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
void addChild(const XMLObject &child)
Add a child node to the node.
std::stack< XMLObject > path_
Defines a class for assembling an XMLObject from XML input.
int endElement(const std::string &tag)
Receive notification of the end of an element.
bool isEmpty() const
Find out if a node is empty.
void removeContentLine(const size_t &i)
A std::string utilities class for Teuchos.
void appendContentLine(const size_t &i, const std::string &str)
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object...
TreeBuildingXMLHandler()
Empty constructor.
void startElement(const std::string &tag, const Map &attributes)
Receive notification of the start of an element.
void addAttribute(const std::string &name, T value)
Lookup whether or not Doubles are allowed.
static bool isWhite(const std::string &str)
Returns true if a std::string consists entirely of whitespace.
static std::string fixUnprintableCharacters(const std::string &str)
Convert unprintable non-null characters to whitespace.
void addContent(const std::string &contentLine)
Add a line of character content.
int numContentLines() const
Return the number of lines of character content stored in this node.
const std::string & getContentLine(int i) const
Return the i-th line of character content stored in this node.