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