|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
Class used to handle parsing in an attribute of type=="OtherXML" which basically just has to keep appending the elements and content into a string until the containing <attribute> element is closed. More...
#include <OtherXMLParser.h>


Public Member Functions | |
| int | getParseDepth () const |
| Get the current parse depth (how many elements we've opened with onStartElement and not closed yet) It's an int so negative implies an underflow error state. More... | |
| const std::string & | getString () const |
| Get the parsed data as big string that we've been parsing in. More... | |
| virtual void | onCharacters (const std::string &content) |
| Called when characters are encountered within an element. More... | |
| virtual void | onEndDocument () |
| virtual void | onEndElement (const std::string &name) |
| virtual void | onEndElementWithNamespace (const std::string &localname, const std::string &prefix, const std::string &uri) |
| SAX2 End element with namespace information. More... | |
| virtual void | onParseError (std::string msg) |
| An unrecoverable parse error occurred. More... | |
| virtual void | onParseWarning (std::string msg) |
| A recoverable parse error occured. More... | |
| virtual void | onStartDocument () |
| virtual void | onStartElement (const std::string &name, const XMLAttributeMap &attrs) |
| 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. More... | |
| OtherXMLParser (NCMLParser &p) | |
| void | reset () |
| Reset the string and depth so we can start parsing from scratch again. More... | |
| virtual void | setParseLineNumber (int) |
| Before any of the callbacks are issued, this function is called to let the implementing parser know what line number in the parse the next callback is being issued from to allow for more informative error messages. More... | |
| virtual | ~OtherXMLParser () |
Class used to handle parsing in an attribute of type=="OtherXML" which basically just has to keep appending the elements and content into a string until the containing <attribute> element is closed.
Subclass of SaxParser so the NCMLParser can just hand off calls to it and it can do what it needs to do, as well as give a proper error.
Definition at line 49 of file OtherXMLParser.h.
|
explicit |
Definition at line 37 of file OtherXMLParser.cc.
|
virtual |
Definition at line 44 of file OtherXMLParser.cc.
References reset().

| int ncml_module::OtherXMLParser::getParseDepth | ( | ) | const |
Get the current parse depth (how many elements we've opened with onStartElement and not closed yet) It's an int so negative implies an underflow error state.
Definition at line 50 of file OtherXMLParser.cc.
| const std::string & ncml_module::OtherXMLParser::getString | ( | ) | const |
Get the parsed data as big string that we've been parsing in.
Definition at line 57 of file OtherXMLParser.cc.
|
virtual |
Called when characters are encountered within an element.
content is only valid for the call duration. Note: this will return all whitespace in the document as well, which makes it messy to use.
Implements ncml_module::SaxParser.
Definition at line 146 of file OtherXMLParser.cc.
Referenced by ncml_module::NCMLParser::onCharacters().
|
virtual |
Implements ncml_module::SaxParser.
Definition at line 76 of file OtherXMLParser.cc.
References THROW_NCML_INTERNAL_ERROR.
|
virtual |
Implements ncml_module::SaxParser.
Definition at line 93 of file OtherXMLParser.cc.
Referenced by ncml_module::NCMLParser::onEndElement().
|
virtual |
SAX2 End element with namespace information.
| localname | the localname of the element |
| prefix | the namespace prefix or "" on the element |
| uri | the uri (or "") associated with the namespace of the element. |
Implements ncml_module::SaxParser.
Definition at line 136 of file OtherXMLParser.cc.
References ncml_module::XMLAttribute::getQName().
Referenced by ncml_module::NCMLParser::onEndElementWithNamespace().

|
virtual |
An unrecoverable parse error occurred.
Implements ncml_module::SaxParser.
Definition at line 160 of file OtherXMLParser.cc.
References THROW_NCML_PARSE_ERROR.
|
virtual |
A recoverable parse error occured.
Implements ncml_module::SaxParser.
Definition at line 153 of file OtherXMLParser.cc.
References THROW_NCML_PARSE_ERROR.
|
virtual |
Implements ncml_module::SaxParser.
Definition at line 70 of file OtherXMLParser.cc.
References THROW_NCML_INTERNAL_ERROR.
|
virtual |
| name | name of the element |
| attrs | a map of any attributes -> values. Volatile for this call. |
Implements ncml_module::SaxParser.
Definition at line 82 of file OtherXMLParser.cc.
Referenced by ncml_module::NCMLParser::onStartElement().
|
virtual |
SAX2 start element call with gets namespace information.
| localname | the localname of the element |
| prefix | the namespace prefix of the element, or "" if none. |
| uri | the uri for the namespace of the element. |
| attributes | table of the attributes (excluding namespace attributes prefixed with xmlns) |
| namespace | table of all the namespaces specification on this element |
Implements ncml_module::SaxParser.
Definition at line 100 of file OtherXMLParser.cc.
References BESDEBUG, ncml_module::XMLNamespaceStack::getFlattenedNamespacesUsingLexicalScoping(), and ncml_module::NCMLParser::getXMLNamespaceStack().
Referenced by ncml_module::NCMLParser::onStartElementWithNamespace().

| void ncml_module::OtherXMLParser::reset | ( | ) |
Reset the string and depth so we can start parsing from scratch again.
Definition at line 63 of file OtherXMLParser.cc.
Referenced by ~OtherXMLParser().
|
inlinevirtualinherited |
Before any of the callbacks are issued, this function is called to let the implementing parser know what line number in the parse the next callback is being issued from to allow for more informative error messages.
(Default impl is to ignore it now).
Reimplemented in ncml_module::NCMLParser.
Definition at line 119 of file SaxParser.h.