Go to the documentation of this file.
26 #ifndef __TERRALIB_XML_INTERNAL_READER_H
27 #define __TERRALIB_XML_INTERNAL_READER_H
37 #include <boost/cstdint.hpp>
38 #include <boost/noncopyable.hpp>
130 virtual void read(
const std::string& fileURI) = 0;
251 virtual std::string
getAttr(
const std::string& name)
const = 0;
260 virtual std::string
getAttr(std::size_t i)
const = 0;
366 virtual void getNamespace(std::size_t i, std::pair<std::string, std::string>& ns)
const = 0;
382 #endif // __TERRALIB_XML_INTERNAL_READER_H
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
virtual bool getElementValueAsBoolean() const
It returns the element data value in the case of VALUE node.
virtual std::string getAttrURI(std::size_t i) const =0
It returns the attribute URI of the associated namespace in the case of an element node.
virtual std::string getAttrQName(std::size_t i) const =0
It returns the qualified name for the i-th attribute.
virtual void setDoNamespaces(bool d)=0
It enables or disables the parser namespace processing.
virtual void setValidationScheme(bool d)=0
If true the parser will perform a validation scheme.
virtual std::string getElementURI() const =0
It returns the URI of the associated namespace in the case of an element node.
virtual ~Reader()
Virtual destructor.
virtual std::string getAttrLocalName(std::size_t i) const =0
It returns the local part of the attribute name for the i-th attribute.
virtual void setCacheGrammarFromParse(bool d)=0
If true it caches the grammar in the pool for re-use in subsequent parses.
virtual void setDoSchema(bool d)=0
It enables or disables the parser schema processing.
virtual double getElementValueAsDouble() const
It returns the element data value in the case of VALUE node.
virtual double getAttrAsDouble(std::size_t i) const
It returns the attribute value in the case of an element node with valid attributes.
#define TEXMLEXPORT
You can use this macro in order to export/import classes and functions from this module.
virtual void readFromContent(const std::string &content)=0
It prepare the given content to be read.
This class models a XML reader object.
virtual boost::uint32_t getAttrAsUInt32(const std::string name) const
It returns the attribute value in the case of an element node with valid attributes.
virtual std::size_t getAttrPosition(const std::string &name) const =0
It returns the attribute position.
virtual boost::uint32_t getAttrAsUInt32(std::size_t i) const
It returns the attribute value in the case of an element node with valid attributes.
Enumerations of XML module.
virtual std::size_t getNumberOfNamespaces() const =0
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes.
virtual std::size_t getNumberOfAttrs() const =0
It returns the number of attributes in the case of an element node.
virtual void read(const std::string &fileURI)=0
It prepare the given file to be read.
NodeType
The type of node read by XML reader.
virtual bool hasAttrs() const =0
It tells if the element has attributes in the case of an element node.
virtual std::string getElementQName() const =0
It returns the qualified name in the case of an element node.
virtual NodeType getNodeType() const =0
It return the type of node read.
virtual std::string getElementValue() const =0
It returns the element data value in the case of VALUE node.
virtual std::size_t getElementDataLen() const =0
It returns the element data value in the case of VALUE node.
virtual std::string getAttr(std::size_t i) const =0
It returns the attribute value in the case of an element node with valid attributes.
virtual double getAttrAsDouble(const std::string &name) const
It returns the attribute value in the case of an element node with valid attributes.
virtual void setInternalBufferSize(const std::size_t size)=0
It sets the maximal allowed buffer size used for parsing.
Proxy configuration file for TerraView (see terraview_config.h).
virtual void getNamespace(std::size_t i, std::pair< std::string, std::string > &ns) const =0
virtual boost::int32_t getAttrAsInt32(const std::string &name) const
It returns the attribute value in the case of an element node with valid attributes.
virtual boost::int32_t getAttrAsInt32(std::size_t i) const
It returns the attribute value in the case of an element node with valid attributes.
virtual boost::int32_t getElementValueAsInt32() const
It returns the element data value in the case of VALUE node.
virtual void setUseCachedGrammarInParse(bool d)=0
If true the reader will use cached grammar if it exists in the pool.
virtual bool next()=0
It gets the next event to be read.
Reader()
Default constructor.
virtual void setIgnoreWhiteSpaces(bool d)=0
If true the parser will ignore the white space characters.