This class implements Xerces interface for a handler that receives general document events. More...
#include <ReaderHandler.h>
Public Member Functions | |
| void | characters (const XMLCh *const chars, const XMLSize_t length) |
| It receives notification of character data. More... | |
| void | endDocument () |
| It receives notification of the end of a document. More... | |
| void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) |
| It receives notification of the end of an element. More... | |
| void | endPrefixMapping (const XMLCh *const prefix) |
| It receives notification of the end of an namespace prefix mapping. More... | |
| XMLSize_t | getDataLen () const |
| const xercesc::Attributes * | getElementAttrs () const |
| TODO. More... | |
| const XMLCh * | getElementLocalName () const |
| TODO. More... | |
| const XMLCh * | getElementQName () const |
| TODO. More... | |
| const XMLCh * | getElementURI () const |
| TODO. More... | |
| const XMLCh * | getElementValue () const |
| const std::pair< const XMLCh *, const XMLCh * > & | getNamespace (std::size_t i) const |
| te::xml::NodeType | getNodeType () const |
| It return the type of node read by the handler. More... | |
| std::size_t | getNumberOfNamespaces () const |
| void | ignorableWhitespace (const XMLCh *const chars, const XMLSize_t length) |
| It receives notification of ignorable whitespace in element content. More... | |
| bool | isInContractedForm () const |
| void | processingInstruction (const XMLCh *const target, const XMLCh *const data) |
| It receives notification of a processing instruction. More... | |
| ReaderHandler () | |
| Default constructor. More... | |
| void | reset () |
| void | setDocumentLocator (const xercesc::Locator *const locator) |
| It receives an object for locating the origin of SAX document events. More... | |
| void | setInContractedForm (bool d) |
| void | setNodeType (te::xml::NodeType type) |
| void | skippedEntity (const XMLCh *const name) |
| It receives notification of a skipped entity. More... | |
| void | startDocument () |
| It receives notification of the beginning of a document. More... | |
| void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const xercesc::Attributes &attrs) |
| It receives notification of the beginning of an element. More... | |
| void | startPrefixMapping (const XMLCh *const prefix, const XMLCh *const uri) |
| It receives notification of the start of an namespace prefix mapping. More... | |
| ~ReaderHandler () | |
| Destructor. More... | |
Protected Attributes | |
| const xercesc::Attributes * | m_attrs |
| The attributes attached to the current element, if any. More... | |
| bool | m_isInContractedForm |
| A flag that indicates if the reader handler is on an contracted form element. More... | |
| XMLSize_t | m_len |
| The number of characters in the m_value array. More... | |
| const XMLCh * | m_localname |
| The local part of the current element name. More... | |
| te::xml::NodeType | m_nodeType |
| The type of node read by the parser. More... | |
| std::vector< std::pair< const XMLCh *, const XMLCh * > > | m_nspaces |
| A vector of namespaces (prefix, uri). More... | |
| const XMLCh * | m_qname |
| The QName of the current element. More... | |
| const XMLCh * | m_uri |
| URI of the associated namespace for the current element. More... | |
| const XMLCh * | m_value |
| May be characters from the XML document, ignorable white spaces, CDATA or any other string. More... | |
This class implements Xerces interface for a handler that receives general document events.
Definition at line 52 of file ReaderHandler.h.
| te::xerces::ReaderHandler::ReaderHandler | ( | ) |
Default constructor.
Definition at line 35 of file ReaderHandler.cpp.
|
inline |
Destructor.
Definition at line 60 of file ReaderHandler.h.
References characters(), endDocument(), endElement(), endPrefixMapping(), getNodeType(), ignorableWhitespace(), processingInstruction(), reset(), setDocumentLocator(), skippedEntity(), startDocument(), startElement(), and startPrefixMapping().
| void te::xerces::ReaderHandler::characters | ( | const XMLCh *const | chars, |
| const XMLSize_t | length | ||
| ) |
It receives notification of character data.
| chars | The characters from the XML document. |
| length | The number of characters to read from the array. |
| SAXException | It may throws an exception. |
Definition at line 54 of file ReaderHandler.cpp.
References m_len, m_nodeType, m_value, te::xml::VALUE, and te::xml::WHITESPACE.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::endDocument | ( | ) |
It receives notification of the end of a document.
| SAXException | It may throws an exception. |
Definition at line 61 of file ReaderHandler.cpp.
References te::xml::END_DOCUMENT, and m_nodeType.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::endElement | ( | const XMLCh *const | uri, |
| const XMLCh *const | localname, | ||
| const XMLCh *const | qname | ||
| ) |
It receives notification of the end of an element.
| uri | The URI of the associated namespace for this element. |
| localname | The local part of the element name. |
| qname | The QName of this element. |
| SAXException | It may throws an exception. |
Definition at line 66 of file ReaderHandler.cpp.
References te::xml::END_ELEMENT, m_isInContractedForm, m_localname, m_nodeType, m_qname, m_uri, and te::xml::START_ELEMENT.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::endPrefixMapping | ( | const XMLCh *const | prefix | ) |
It receives notification of the end of an namespace prefix mapping.
| prefix | The namespace prefix used. |
| SAXException | It may throws an exception. |
Definition at line 119 of file ReaderHandler.cpp.
References m_nodeType, and te::xml::UNKNOWN.
Referenced by ~ReaderHandler().
|
inline |
Definition at line 205 of file ReaderHandler.h.
References m_len.
Referenced by te::xerces::Reader::getElementDataLen().
|
inline |
TODO.
Definition at line 199 of file ReaderHandler.h.
References m_attrs.
Referenced by te::xerces::Reader::getAttr(), te::xerces::Reader::getAttrLocalName(), te::xerces::Reader::getAttrPosition(), te::xerces::Reader::getAttrQName(), te::xerces::Reader::getAttrURI(), te::xerces::Reader::getNumberOfAttrs(), and te::xerces::Reader::hasAttrs().
|
inline |
TODO.
Definition at line 185 of file ReaderHandler.h.
References m_localname.
Referenced by te::xerces::Reader::getElementLocalName().
|
inline |
TODO.
Definition at line 192 of file ReaderHandler.h.
References m_qname.
Referenced by te::xerces::Reader::getElementQName().
|
inline |
TODO.
Definition at line 178 of file ReaderHandler.h.
References m_uri.
Referenced by te::xerces::Reader::getElementURI().
|
inline |
Definition at line 201 of file ReaderHandler.h.
References m_value.
Referenced by te::xerces::Reader::getElementValue().
|
inline |
Definition at line 209 of file ReaderHandler.h.
References d, isInContractedForm(), m_nspaces, setInContractedForm(), and setNodeType().
Referenced by te::xerces::Reader::getNamespace().
| te::xml::NodeType te::xerces::ReaderHandler::getNodeType | ( | ) | const |
It return the type of node read by the handler.
Definition at line 129 of file ReaderHandler.cpp.
References m_nodeType.
Referenced by te::xerces::Reader::getNodeType(), te::xerces::Reader::next(), te::xerces::Reader::read(), and ~ReaderHandler().
|
inline |
Definition at line 207 of file ReaderHandler.h.
References m_nspaces.
Referenced by te::xerces::Reader::getNumberOfNamespaces().
| void te::xerces::ReaderHandler::ignorableWhitespace | ( | const XMLCh *const | chars, |
| const XMLSize_t | length | ||
| ) |
It receives notification of ignorable whitespace in element content.
| chars | The characters from the XML document. |
| length | The number of characters to read from the array. |
| SAXException | It may throws an exception. |
Definition at line 80 of file ReaderHandler.cpp.
References m_nodeType, and te::xml::UNKNOWN.
Referenced by ~ReaderHandler().
| bool te::xerces::ReaderHandler::isInContractedForm | ( | ) | const |
Definition at line 139 of file ReaderHandler.cpp.
References m_isInContractedForm.
Referenced by getNamespace(), and te::xerces::Reader::next().
| void te::xerces::ReaderHandler::processingInstruction | ( | const XMLCh *const | target, |
| const XMLCh *const | data | ||
| ) |
It receives notification of a processing instruction.
| target | The processing instruction target. |
| data | The processing instruction data, or null if none was supplied. |
| SAXException | It may throws an exception. |
Definition at line 87 of file ReaderHandler.cpp.
References m_nodeType, and te::xml::UNKNOWN.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::reset | ( | ) |
Definition at line 48 of file ReaderHandler.cpp.
References m_nodeType, m_nspaces, and te::xml::UNKNOWN.
Referenced by te::xerces::Reader::next(), and ~ReaderHandler().
| void te::xerces::ReaderHandler::setDocumentLocator | ( | const xercesc::Locator *const | locator | ) |
It receives an object for locating the origin of SAX document events.
| locator | An object that can return the location of any SAX document event. |
Definition at line 93 of file ReaderHandler.cpp.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::setInContractedForm | ( | bool | d | ) |
Definition at line 144 of file ReaderHandler.cpp.
References d, and m_isInContractedForm.
Referenced by getNamespace(), and te::xerces::Reader::next().
| void te::xerces::ReaderHandler::setNodeType | ( | te::xml::NodeType | type | ) |
Definition at line 134 of file ReaderHandler.cpp.
References m_nodeType.
Referenced by getNamespace(), and te::xerces::Reader::next().
| void te::xerces::ReaderHandler::skippedEntity | ( | const XMLCh *const | name | ) |
It receives notification of a skipped entity.
| name | The name of the skipped entity. |
| SAXException | It may throws an exception. |
Definition at line 124 of file ReaderHandler.cpp.
References m_nodeType, and te::xml::UNKNOWN.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::startDocument | ( | ) |
It receives notification of the beginning of a document.
| SAXException | It may throws an exception. |
Definition at line 98 of file ReaderHandler.cpp.
References m_nodeType, and te::xml::START_DOCUMENT.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::startElement | ( | const XMLCh *const | uri, |
| const XMLCh *const | localname, | ||
| const XMLCh *const | qname, | ||
| const xercesc::Attributes & | attrs | ||
| ) |
It receives notification of the beginning of an element.
| uri | The URI of the associated namespace for this element. |
| localname | The local part of the element name |
| qname | The QName of this element. |
| attrs | The attributes attached to the element, if any. |
| SAXException | It may throws an exception. |
Definition at line 103 of file ReaderHandler.cpp.
References m_attrs, m_localname, m_nodeType, m_qname, m_uri, and te::xml::START_ELEMENT.
Referenced by ~ReaderHandler().
| void te::xerces::ReaderHandler::startPrefixMapping | ( | const XMLCh *const | prefix, |
| const XMLCh *const | uri | ||
| ) |
It receives notification of the start of an namespace prefix mapping.
| prefix | The namespace prefix used. |
| uri | The namespace URI used. |
| SAXException | It may throws an exception. |
Definition at line 112 of file ReaderHandler.cpp.
References m_nodeType, m_nspaces, and te::xml::UNKNOWN.
Referenced by ~ReaderHandler().
|
protected |
The attributes attached to the current element, if any.
Definition at line 222 of file ReaderHandler.h.
Referenced by getElementAttrs(), and startElement().
|
protected |
A flag that indicates if the reader handler is on an contracted form element.
Definition at line 227 of file ReaderHandler.h.
Referenced by endElement(), isInContractedForm(), and setInContractedForm().
|
protected |
The number of characters in the m_value array.
Definition at line 224 of file ReaderHandler.h.
Referenced by characters(), and getDataLen().
|
protected |
The local part of the current element name.
Definition at line 220 of file ReaderHandler.h.
Referenced by endElement(), getElementLocalName(), and startElement().
|
protected |
The type of node read by the parser.
Definition at line 226 of file ReaderHandler.h.
Referenced by characters(), endDocument(), endElement(), endPrefixMapping(), getNodeType(), ignorableWhitespace(), processingInstruction(), reset(), setNodeType(), skippedEntity(), startDocument(), startElement(), and startPrefixMapping().
|
protected |
A vector of namespaces (prefix, uri).
Definition at line 225 of file ReaderHandler.h.
Referenced by getNamespace(), getNumberOfNamespaces(), reset(), and startPrefixMapping().
|
protected |
The QName of the current element.
Definition at line 221 of file ReaderHandler.h.
Referenced by endElement(), getElementQName(), and startElement().
|
protected |
URI of the associated namespace for the current element.
Definition at line 219 of file ReaderHandler.h.
Referenced by endElement(), getElementURI(), and startElement().
|
protected |
May be characters from the XML document, ignorable white spaces, CDATA or any other string.
Definition at line 223 of file ReaderHandler.h.
Referenced by characters(), and getElementValue().