84 appendOpenStartElementTag(name,
"");
85 appendAttributes(attrs);
87 appendCloseStartElementTag();
95 appendEndElementTag(name);
101 const std::string& localname,
102 const std::string& prefix,
107 appendOpenStartElementTag(localname, prefix);
108 appendAttributes(attributes);
114 BESDEBUG(
"ncml",
"Got depth 0 OtherXML element while parsing OtherXML attribute..." <<
115 " Pulling all un-shadowed ancestral namespaces into the element with localname=" <<
123 appendNamespaces(ancestralNamespaces);
127 appendNamespaces(namespaces);
130 appendCloseStartElementTag();
137 const std::string& localname,
138 const std::string& prefix,
149 _otherXML.append(content);
156 "OtherXMLParser: got SAX parse warning while parsing OtherXML. Msg was: " + msg);
163 "OtherXMLParser: got SAX parse error while parsing OtherXML. Msg was: " + msg);
167 OtherXMLParser::appendOpenStartElementTag(
const std::string& localname,
const std::string& prefix)
170 _otherXML += string(
"<");
175 OtherXMLParser::appendAttributes(
const XMLAttributeMap& attributes)
178 it != attributes.end();
181 _otherXML += ( string(
" ") +
190 OtherXMLParser::appendNamespaces(
const XMLNamespaceMap& namespaces)
192 _otherXML += namespaces.getAllNamespacesAsAttributeString();
196 OtherXMLParser::appendCloseStartElementTag()
202 OtherXMLParser::appendEndElementTag(
const string& qname)
204 _otherXML += ( string(
"</") + qname +
">" );
208 OtherXMLParser::pushDepth()
214 OtherXMLParser::popDepth()
virtual ~OtherXMLParser()
int getParseDepth() const
Get the current parse depth (how many elements we've opened with onStartElement and not closed yet) I...
virtual void onParseWarning(std::string msg)
A recoverable parse error occured.
virtual void onEndDocument()
An abstract superclass for NCMLArray that handles the non-parameterized functionality and allows u...
virtual void onStartDocument()
virtual void onEndElementWithNamespace(const std::string &localname, const std::string &prefix, const std::string &uri)
SAX2 End element with namespace information.
const XMLNamespaceStack & getXMLNamespaceStack() const
If using namespaces, get the current stack of namespaces.
virtual void onStartElement(const std::string &name, const XMLAttributeMap &attrs)
const std::string & getString() const
Get the parsed data as big string that we've been parsing in.
virtual void onCharacters(const std::string &content)
Called when characters are encountered within an element.
#define THROW_NCML_PARSE_ERROR(parseLine, msg)
void getFlattenedNamespacesUsingLexicalScoping(XMLNamespaceMap &nsFlattened) const
Scanning from the stack top downwards, add the first found new XMLNamespace (in terms of its prefix) ...
#define THROW_NCML_INTERNAL_ERROR(msg)
vector< XMLAttribute >::const_iterator const_iterator
void reset()
Reset the string and depth so we can start parsing from scratch again.
virtual void onStartElementWithNamespace(const std::string &localname, const std::string &prefix, const std::string &uri, const XMLAttributeMap &attributes, const XMLNamespaceMap &namespaces)
SAX2 start element call with gets namespace information.
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
virtual void onEndElement(const std::string &name)
string getQName() const
get the name with the prefix:localname if prefix not empty else localname
virtual void onParseError(std::string msg)
An unrecoverable parse error occurred.