Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# TiPullXmlNode Class Reference

`#include <tinyxml.h>`

Inheritance diagram for TiPullXmlNode:

[legend]
Collaboration diagram for TiPullXmlNode:

[legend]
List of all members.

## Public Types
enum | NodeType { DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, DECLARATION, TYPECOUNT }
## Public Member Functions
virtual | ~TiPullXmlNode ()
const char * | Value () const
void | SetValue (const char *val)
TiPullXmlNode * | LinkActiveChild (TiPullXmlNode *node)
TiPullXmlNode * | Parent () const
| One step up the DOM.
TiPullXmlNode * | FirstChild ()
| The first child of this node with the matching 'value'. Will be null if none found.
TiPullXmlNode * | FirstChild (const char *value, NodeType _type)
| The first child of this node with the matching 'value'. Will be null if none found.
TiPullXmlNode * | NextSibling ()
TiPullXmlNode * | NextSibling (const char *_value, NodeType _type)
| Navigate to a sibling node with the given 'value'.
TiPullXmlElement * | NextSiblingElement ()
TiPullXmlElement * | NextSiblingElement (const char *_value)
TiPullXmlElement * | FirstChildElement ()
| Convenience function to get through elements.
TiPullXmlElement * | FirstChildElement (const char *_value)
| Convenience function to get through elements.
virtual NodeType | Type () const
bool | hasChildren () const
TiPullXmlDocument * | GetDocument () const
TiPullXmlDocument * | ToDocument () const
| Cast to a more defined type. Will return null not of the requested type.
TiPullXmlElement * | ToElement () const
| Cast to a more defined type. Will return null not of the requested type.
TiPullXmlComment * | ToComment () const
| Cast to a more defined type. Will return null not of the requested type.
TiPullXmlUnknown * | ToUnknown () const
| Cast to a more defined type. Will return null not of the requested type.
TiPullXmlText * | ToText () const
| Cast to a more defined type. Will return null not of the requested type.
TiPullXmlDeclaration * | ToDeclaration () const
| Cast to a more defined type. Will return null not of the requested type.
int | Row () const
int | Column () const
## Protected Member Functions
| TiPullXmlNode (NodeType type)
TiPullXmlNode * | Identify (const char *start) const
bool | FindElementClose (ParsePosition in, const char *&out)
TiXmlString | SValue () const
## Protected Attributes
TiPullXmlNode * | parent
TiPullXmlNode * | activeChild
NodeType const | type
TiPullXmlCursor | endPosOpen
TiPullXmlCursor | endPosClose
TiXmlString | value
## Friends
class | TiPullXmlDocument
class | TiPullXmlElement
TiXmlOutStream & | operator<< (TiXmlOutStream &out, const TiPullXmlNode &base)

## Detailed Description

The parent class for everything in the Document Object Model. (Except for attributes). Nodes have siblings, a parent, and children. A node can be in a document, or stand on its own. The type of a TiXmlNode can be queried, and it can be cast to its more defined type.

## Member Enumeration Documentation

enum TiPullXmlNode::NodeType

  | The types of XML nodes supported by TinyXml. (All the unsupported types are picked up by UNKNOWN.) Enumeration values:
  DOCUMENT |
  ELEMENT |
  COMMENT |
  UNKNOWN |
  TEXT |
  DECLARATION |
  TYPECOUNT |

## Constructor & Destructor Documentation

TiPullXmlNode::~TiPullXmlNode | ( |  | ) | `[virtual]`

TiPullXmlNode::TiPullXmlNode | ( | NodeType | type | ) | `[protected]`

## Member Function Documentation

int TiPullXmlNode::Column | ( |  | ) | const

bool TiPullXmlNode::FindElementClose | ( | ParsePosition | in,
|  | const char *& | out
| ) | `[protected]`

TiPullXmlNode * TiPullXmlNode::FirstChild | ( | const char * | value,
|  | NodeType | _type
| ) |

| The first child of this node with the matching 'value'. Will be null if none found.

TiPullXmlNode * TiPullXmlNode::FirstChild | ( |  | ) |

| The first child of this node with the matching 'value'. Will be null if none found.

TiPullXmlElement* TiPullXmlNode::FirstChildElement | ( | const char * | _value | ) | `[inline]`

| Convenience function to get through elements.

TiPullXmlElement * TiPullXmlNode::FirstChildElement | ( |  | ) |

| Convenience function to get through elements.

TiPullXmlDocument * TiPullXmlNode::GetDocument | ( |  | ) | const

| Return a pointer to the Document this node lives in. Returns null if not in a document.

bool TiPullXmlNode::hasChildren | ( |  | ) | const`[inline]`

TiPullXmlNode * TiPullXmlNode::Identify | ( | const char * | start | ) | const`[protected]`

TiPullXmlNode * TiPullXmlNode::LinkActiveChild | ( | TiPullXmlNode * | node | ) |

TiPullXmlNode * TiPullXmlNode::NextSibling | ( | const char * | _value,
|  | NodeType | _type
| ) |

| Navigate to a sibling node with the given 'value'.

TiPullXmlNode * TiPullXmlNode::NextSibling | ( |  | ) |

TiPullXmlElement* TiPullXmlNode::NextSiblingElement | ( | const char * | _value | ) | `[inline]`

TiPullXmlElement * TiPullXmlNode::NextSiblingElement | ( |  | ) |

| Convenience function to get through elements. Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element.

TiPullXmlNode* TiPullXmlNode::Parent | ( |  | ) | const`[inline]`

| One step up the DOM.

int TiPullXmlNode::Row | ( |  | ) | const

| Return the position, in the original source file, of this node or attribute. The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value. Generally, the row and column value will be set when the TiXmlDocument::Load(), TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator>>. The values reflect the initial load. Once the DOM is modified programmatically (by adding or changing nodes and attributes) the new values will NOT update to reflect changes in the document. There is a minor performance cost to computing the row and column. Computation can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value. See also: TiXmlDocument::SetTabSize()

void TiPullXmlNode::SetValue | ( | const char * | val | ) | `[inline]`

TiXmlString TiPullXmlNode::SValue | ( |  | ) | const`[inline, protected]`

TiPullXmlComment* TiPullXmlNode::ToComment | ( |  | ) | const`[inline]`

| Cast to a more defined type. Will return null not of the requested type.

TiPullXmlDeclaration* TiPullXmlNode::ToDeclaration | ( |  | ) | const`[inline]`

| Cast to a more defined type. Will return null not of the requested type.

TiPullXmlDocument* TiPullXmlNode::ToDocument | ( |  | ) | const`[inline]`

| Cast to a more defined type. Will return null not of the requested type.

TiPullXmlElement* TiPullXmlNode::ToElement | ( |  | ) | const`[inline]`

| Cast to a more defined type. Will return null not of the requested type.

TiPullXmlText* TiPullXmlNode::ToText | ( |  | ) | const`[inline]`

| Cast to a more defined type. Will return null not of the requested type.

TiPullXmlUnknown* TiPullXmlNode::ToUnknown | ( |  | ) | const`[inline]`

| Cast to a more defined type. Will return null not of the requested type.

virtual NodeType TiPullXmlNode::Type | ( |  | ) | const`[inline, virtual]`

| Query the type (as an enumerated value, above) of this node. The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION.

const char* TiPullXmlNode::Value | ( |  | ) | const`[inline]`

| The meaning of 'value' changes for the specific type of TiPullXmlNode.
    		Document:	filename of the xml file
    		Element:	name of the element
    		Comment:	the comment text
    		Unknown:	the tag contents
    		Text:		the text string
The subclasses will wrap this function.

## Friends And Related Function Documentation

TiXmlOutStream& operator<< | ( | TiXmlOutStream & | out,
|  | const TiPullXmlNode & | base
| ) | `[friend]`

friend class TiPullXmlDocument`[friend]`

| Reimplemented from TiPullXmlBase.

friend class TiPullXmlElement`[friend]`

| Reimplemented from TiPullXmlBase. Reimplemented in TiPullXmlText.

## Member Data Documentation

TiPullXmlNode* TiPullXmlNode::activeChild`[protected]`

TiPullXmlCursor TiPullXmlNode::endPosClose`[protected]`

TiPullXmlCursor TiPullXmlNode::endPosOpen`[protected]`

TiPullXmlNode* TiPullXmlNode::parent`[protected]`

NodeType const TiPullXmlNode::type`[protected]`

TiXmlString TiPullXmlNode::value`[protected]`

The documentation for this class was generated from the following files:

- pull/tinyxml.h
- pull/tinyxml.cpp
- pull/tinyxmlparser.cpp