#include <Pt/Xml/Node.h>
XML document node. More...
Inherited by Characters, Comment, DocType, EndDocType, EndDocument, EndElement, EntityReference, ProcessingInstruction, StartDocument, and StartElement.
Public Member Functions | |
virtual | ~Node () |
Destructor. | |
Type | type () const |
Returns the type of the node. | |
Protected Member Functions | |
Node (Type type) | |
Constructs a new Node object with the specified node type. | |
The XmlReader reports the content of a XML document as XML nodes. A node might be a start element, an end element, characters, a comment or a doctype declaration. The specialized node classes have methods and data members to process the information specific to the node. So, this class serves more or less as an anchor for casting and as a common token type.
To cast to a derived node, a static_cast can be done after checking the node type, or the helper functions such as toStartElement() can be used.