26 #ifndef __TERRALIB_XERCES_INTERNAL_CONTENTHANDLER_H
27 #define __TERRALIB_XERCES_INTERNAL_CONTENTHANDLER_H
30 #include "../xml/Enums.h"
39 #include <xercesc/sax2/ContentHandler.hpp>
40 #include <xercesc/util/TransService.hpp>
75 void characters(
const XMLCh*
const chars,
const XMLSize_t length);
93 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname);
139 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname,
const xercesc::Attributes& attrs);
228 std::vector<std::pair<const XMLCh*, const XMLCh*> >
m_nspaces;
This class implements Xerces interface for a handler that receives general document events.
const XMLCh * m_qname
The QName of the current element.
~ReaderHandler()
Destructor.
std::unique_ptr< xercesc::XMLTranscoder > m_transcoder
The transcoder to be used. TerraLib always expect the encoding to be UTF-8, so we must force it.
void processingInstruction(const XMLCh *const target, const XMLCh *const data)
It receives notification of a processing instruction.
ReaderHandler()
Default constructor.
void setNodeType(te::xml::NodeType type)
void characters(const XMLCh *const chars, const XMLSize_t length)
It receives notification of character data.
te::xml::NodeType m_nodeType
The type of node read by the parser.
const XMLCh * getElementURI() const
TODO.
const xercesc::Attributes * getElementAttrs() const
TODO.
const std::string getElementValue() const
te::xml::NodeType getNodeType() const
It return the type of node read by the handler.
const XMLCh * m_localname
The local part of the current element name.
void startPrefixMapping(const XMLCh *const prefix, const XMLCh *const uri)
It receives notification of the start of an namespace prefix mapping.
bool m_isInContractedForm
A flag that indicates if the reader handler is on an contracted form element.
XMLSize_t m_len
The number of characters in the m_value array.
std::string m_value
May be characters from the XML document, ignorable white spaces, CDATA or any other string.
void setDocumentLocator(const xercesc::Locator *const locator)
It receives an object for locating the origin of SAX document events.
const xercesc::Attributes * m_attrs
The attributes attached to the current element, if any.
void setInContractedForm(bool d)
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
It receives notification of the end of an element.
std::vector< std::pair< const XMLCh *, const XMLCh * > > m_nspaces
A vector of namespaces (prefix, uri).
const XMLCh * m_uri
URI of the associated namespace for the current element.
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.
void endDocument()
It receives notification of the end of a document.
void startDocument()
It receives notification of the beginning of a document.
void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length)
It receives notification of ignorable whitespace in element content.
bool isInContractedForm() const
const XMLCh * getElementQName() const
TODO.
const std::pair< const XMLCh *, const XMLCh * > & getNamespace(std::size_t i) const
void endPrefixMapping(const XMLCh *const prefix)
It receives notification of the end of an namespace prefix mapping.
const XMLCh * getElementLocalName() const
TODO.
std::size_t getNumberOfNamespaces() const
void skippedEntity(const XMLCh *const name)
It receives notification of a skipped entity.
XMLSize_t getDataLen() const
NodeType
The type of node read by XML reader.
Proxy configuration file for TerraView (see terraview_config.h).