57 "TreeBuildingXMLHandler::trying to add content to an empty node");
59 size_t k =
current_.numContentLines();
61 if(chars.compare(
"\n")==0) {
62 if((k>0) && (
current_.getContentLine(k-1).length()>0))
78 const Map& attributes)
92 for (Map::const_iterator i=attributes.begin(); i != attributes.end(); ++i)
94 const std::string& key = (*i).first;
95 const std::string& val = (*i).second;
103 if (
path_.size() > 0)
109 size_t k =
current_.numContentLines();
110 while( (k>0) && (
current_.getContentLine(--k).length() == 0))
A std::string utilities class for Teuchos.
Defines a class for assembling an XMLObject from XML input.
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 addChild(const XMLObject &child)
Add a child node to the node.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.