29 #ifndef Pt_Xml_XmlReader_h
30 #define Pt_Xml_XmlReader_h
32 #include <Pt/Xml/Api.h>
33 #include <Pt/Xml/Node.h>
34 #include <Pt/String.h>
35 #include <Pt/NonCopyable.h>
43 class DocTypeDefinition;
135 void setChunkSize(std::size_t n);
139 void setMaxInputDepth(std::size_t n);
143 void setMaxSize(std::size_t n);
147 std::size_t maxSize()
const;
151 std::size_t usedSize()
const;
155 void reportStartDocument(
bool value);
159 void reportDocType(
bool value);
163 void reportProcessingInstructions(
bool value);
167 void reportCData(
bool value);
171 void reportComments(
bool value);
175 void reportEntityReferences(
bool value);
187 std::size_t depth()
const;
191 std::size_t line()
const;
214 class XmlReaderImpl* _impl;
217 XmlReaderImpl* impl()
238 { _node = &_stream->
get(); }
243 : _stream(it._stream), _node(it._node)
255 _stream = it._stream;
274 if(_node->
type() == Node::EndDocument)
277 _node = &_stream->
next();
285 {
return _node == it._node; }
290 {
return _node != it._node; }
313 #endif // Pt_Xml_XmlReader_h
Protects derived classes from being copied.
Definition: NonCopyable.h:54
Reads XML as a Stream of XML Nodes.
Definition: XmlReader.h:79
Node & get()
Get current node.
Node & next()
Get next node.
The DocTypeDefinition of an XML document.
Definition: DocTypeDefinition.h:57
InputIterator current()
Returns an iterator to the current node.
Definition: XmlReader.h:298
InputIterator end() const
Returns an iterator to the end of the document.
Definition: XmlReader.h:304
Resolves external entities and DTDs.
Definition: XmlResolver.h:53
Type type() const
Returns the type of the node.
Definition: Node.h:74
XML document node.
Definition: Node.h:50