|
Ghidra 11.4.2
Ghidra internal decompiler documentation.
|
A SAX interface implementation for constructing an in-memory DOM model. More...
#include <xml.hh>
Public Member Functions | |
| TreeHandler (Element *rt) | |
| Constructor given root Element. | |
| virtual void | setDocumentLocator (Locator locator) |
| Set the Locator object for documents. | |
| virtual void | startDocument (void) |
| Start processing a new XML document. | |
| virtual void | endDocument (void) |
| End processing for the current XML document. | |
| virtual void | startPrefixMapping (const string &prefix, const string &uri) |
| Start a new prefix to namespace URI mapping. | |
| virtual void | endPrefixMapping (const string &prefix) |
| Finish the current prefix. | |
| virtual void | startElement (const string &namespaceURI, const string &localName, const string &qualifiedName, const Attributes &atts) |
| Callback indicating a new XML element has started. | |
| virtual void | endElement (const string &namespaceURI, const string &localName, const string &qualifiedName) |
| Callback indicating parsing of the current XML element is finished. | |
| virtual void | characters (const char *text, int4 start, int4 length) |
| Callback with raw characters to be inserted in the current XML element. | |
| virtual void | ignorableWhitespace (const char *text, int4 start, int4 length) |
| Callback with whitespace character data for the current XML element. | |
| virtual void | processingInstruction (const string &target, const string &data) |
| Callback for a formal processing instruction seen in the current document. | |
| virtual void | setVersion (const string &val) |
| Set the XML version as specified by the current document. | |
| virtual void | setEncoding (const string &val) |
| Set the character encoding as specified by the current document. | |
| virtual void | skippedEntity (const string &name) |
| Callback for an XML entity skipped by the parser. | |
| virtual void | setError (const string &errmsg) |
| Callback for handling an error condition during XML parsing. | |
| const string & | getError (void) const |
| Get the current error message. | |
Public Member Functions inherited from ghidra::ContentHandler | |
| virtual | ~ContentHandler (void) |
| Destructor. | |
Private Attributes | |
| Element * | root |
| The root XML element being processed by this handler. | |
| Element * | cur |
| The current XML element being processed by this handler. | |
| string | error |
| The last error condition returned by the parser (if not empty) | |
A SAX interface implementation for constructing an in-memory DOM model.
This implementation builds a DOM model of the XML stream being parsed, creating an Element object for each XML element tag in the stream. This handler is initialized with a root Element object, which after parsing is complete will own all parsed elements.
|
virtual |
Callback with raw characters to be inserted in the current XML element.
| text | is an array of character data being inserted. |
| start | is the first character within the array to insert. |
| length | is the number of characters to insert. |
Implements ghidra::ContentHandler.
References ghidra::Element::addContent(), and cur.
|
inlinevirtual |
End processing for the current XML document.
Implements ghidra::ContentHandler.
|
virtual |
Callback indicating parsing of the current XML element is finished.
| namespaceURI | is the namespace to which the element belongs |
| localName | is the local name of the new element |
| qualifiedName | is the fully qualified name of the element. |
Implements ghidra::ContentHandler.
References cur, and ghidra::Element::getParent().
|
inlinevirtual |
Finish the current prefix.
Implements ghidra::ContentHandler.
|
inlinevirtual |
Callback with whitespace character data for the current XML element.
| text | is an array of character data that can be inserted. |
| start | is the first character within the array to insert. |
| length | is the number of characters to insert. |
Implements ghidra::ContentHandler.
|
inlinevirtual |
Callback for a formal processing instruction seen in the current document.
| target | is the target instruction to process |
| data | is (optional) character data for the instruction |
Implements ghidra::ContentHandler.
|
inlinevirtual |
Set the Locator object for documents.
Implements ghidra::ContentHandler.
|
inlinevirtual |
Set the character encoding as specified by the current document.
| encoding | is the parsed encoding string |
Implements ghidra::ContentHandler.
|
inlinevirtual |
Callback for handling an error condition during XML parsing.
| errmsg | is a message describing the error condition |
Implements ghidra::ContentHandler.
References error.
|
inlinevirtual |
Set the XML version as specified by the current document.
| version | is the parsed version string |
Implements ghidra::ContentHandler.
|
inlinevirtual |
Callback for an XML entity skipped by the parser.
| name | is the name of the entity being skipped |
Implements ghidra::ContentHandler.
|
inlinevirtual |
Start processing a new XML document.
Implements ghidra::ContentHandler.
|
virtual |
Callback indicating a new XML element has started.
| namespaceURI | is the namespace to which the new element belongs |
| localName | is the local name of the new element |
| qualifiedName | is the fully qualified name of the new element |
| atts | is the set of (previously parsed) attributes to attach to the new element |
Implements ghidra::ContentHandler.
References ghidra::Element::addAttribute(), ghidra::Element::addChild(), cur, ghidra::Attributes::getLength(), ghidra::Attributes::getLocalName(), ghidra::Attributes::getValue(), and ghidra::Element::setName().
|
inlinevirtual |
Start a new prefix to namespace URI mapping.
Implements ghidra::ContentHandler.