RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Xml::XmlNode Class Referenceabstract

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 XmlNode can be queried, and it can be cast to its more defined type. More...

Inheritance diagram for System::Xml::XmlNode:
System::Xml::XmlBase System::Xml::XmlComment System::Xml::XmlDeclaration System::Xml::XmlDocument System::Xml::XmlElement System::Xml::XmlText System::Xml::XmlUnknown

Public Types

enum  NodeType {
  TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT, TINYXML_UNKNOWN,
  TINYXML_TEXT, TINYXML_DECLARATION, TINYXML_TYPECOUNT
}
 
- Public Types inherited from System::Xml::XmlBase
enum  {
  RLIBXML_NO_ERROR = 0, RLIBXML_ERROR, RLIBXML_ERROR_OPENING_FILE, RLIBXML_ERROR_READING_STREAM,
  RLIBXML_ERROR_PARSING_ELEMENT, RLIBXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, RLIBXML_ERROR_READING_ELEMENT_VALUE, RLIBXML_ERROR_READING_ATTRIBUTES,
  RLIBXML_ERROR_PARSING_EMPTY, RLIBXML_ERROR_READING_END_TAG, RLIBXML_ERROR_PARSING_UNKNOWN, RLIBXML_ERROR_PARSING_COMMENT,
  RLIBXML_ERROR_PARSING_DECLARATION, RLIBXML_ERROR_DOCUMENT_EMPTY, RLIBXML_ERROR_EMBEDDED_NULL, RLIBXML_ERROR_PARSING_CDATA,
  RLIBXML_ERROR_DOCUMENT_TOP_ONLY, RLIBXML_ERROR_MEMORY_NOT_ENOUGH, RLIBXML_ERROR_STRING_COUNT
}
 

Public Member Functions

const StringValue () const
 
void SetValue (const String &_value)
 
void Clear ()
 Delete all the children of this node. Does not affect _T('this').
 
XmlNodeParent ()
 One step up the DOM.
 
const XmlNodeParent () const
 
const XmlNodeFirstChild () const
 The first child of this node. Will be null if there are no children.
 
XmlNodeFirstChild ()
 
const XmlNodeFirstChild (const TCHAR *value) const
 
XmlNodeFirstChild (const TCHAR *_value)
 The first child of this node with the matching T('value'). Will be null if none found. More...
 
const XmlNodeLastChild () const
 
XmlNodeLastChild ()
 The last child of this node. Will be null if there are no children.
 
const XmlNodeLastChild (const TCHAR *value) const
 
XmlNodeLastChild (const TCHAR *_value)
 The last child of this node matching T('value'). Will be null if there are no children.
 
const XmlNodeIterateChildren (const XmlNode *previous) const
 
XmlNodeIterateChildren (const XmlNode *previous)
 
const XmlNodeIterateChildren (const TCHAR *value, const XmlNode *previous) const
 This flavor of IterateChildren searches for children with a particular T('value')
 
XmlNodeIterateChildren (const TCHAR *_value, const XmlNode *previous)
 
XmlNodeInsertEndChild (const XmlNode &addThis)
 
XmlNodeLinkEndChild (XmlNode *addThis)
 
XmlNodeInsertBeforeChild (XmlNode *beforeThis, const XmlNode &addThis)
 
XmlNodeInsertAfterChild (XmlNode *afterThis, const XmlNode &addThis)
 
XmlNodeReplaceChild (XmlNode *replaceThis, const XmlNode &withThis)
 
bool RemoveChild (XmlNode *removeThis)
 Delete a child of this node.
 
const XmlNodePreviousSibling () const
 Navigate to a sibling node.
 
XmlNodePreviousSibling ()
 
const XmlNodePreviousSibling (const TCHAR *) const
 Navigate to a sibling node.
 
XmlNodePreviousSibling (const TCHAR *_prev)
 
const XmlNodeNextSibling () const
 Navigate to a sibling node.
 
XmlNodeNextSibling ()
 
const XmlNodeNextSibling (const TCHAR *) const
 Navigate to a sibling node with the given T('value').
 
XmlNodeNextSibling (const TCHAR *_next)
 
const XmlElementNextSiblingElement () const
 
XmlElementNextSiblingElement ()
 
const XmlElementNextSiblingElement (const TCHAR *) const
 
XmlElementNextSiblingElement (const TCHAR *_next)
 
const XmlElementFirstChildElement () const
 Convenience function to get through elements.
 
XmlElementFirstChildElement ()
 
const XmlElementFirstChildElement (const TCHAR *_value) const
 Convenience function to get through elements.
 
XmlElementFirstChildElement (const TCHAR *_value)
 
int Type () const
 
const XmlDocumentGetDocument () const
 
XmlDocumentGetDocument ()
 
bool NoChildren () const
 Returns true if this node has no children.
 
virtual const XmlDocumentToDocument () const
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual const XmlElementToElement () const
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual const XmlCommentToComment () const
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual const XmlUnknownToUnknown () const
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual const XmlTextToText () const
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual const XmlDeclarationToDeclaration () const
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual XmlDocumentToDocument ()
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual XmlElementToElement ()
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual XmlCommentToComment ()
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual XmlUnknownToUnknown ()
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual XmlTextToText ()
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual XmlDeclarationToDeclaration ()
 Cast to a more defined type. Will return null if not of the requested type.
 
virtual XmlNodeClone () const =0
 
virtual bool Accept (XmlVisitor *visitor) const =0
 
- Public Member Functions inherited from System::Xml::XmlBase
virtual void Print (IO::Stream *cfile, int depth) const =0
 
int Row () const
 
int Column () const
 See Row()
 
void SetUserData (void *user)
 Set a pointer to arbitrary user data.
 
void * GetUserData ()
 Get a pointer to arbitrary user data.
 
const void * GetUserData () const
 Get a pointer to arbitrary user data.
 
virtual const TCHAR * Parse (const TCHAR *p, XmlParsingData *data)=0
 

Public Attributes

 RLIB_DECLARE_DYNCREATE
 

Protected Member Functions

 XmlNode (NodeType _type)
 
void CopyTo (XmlNode *target) const
 
XmlNodeIdentify (const TCHAR *start)
 

Protected Attributes

XmlNodeparent
 
NodeType type
 
XmlNodefirstChild
 
XmlNodelastChild
 
String value
 
XmlNodeprev
 
XmlNodenext
 
- Protected Attributes inherited from System::Xml::XmlBase
XmlCursor location
 
void * userData
 Field containing a generic user pointer.
 

Friends

class RLIB_API XmlDocument
 
class RLIB_API XmlElement
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Xml::XmlBase
static void SetCondenseWhiteSpace (bool condense)
 
static bool IsWhiteSpaceCondensed ()
 Return the current white space setting.
 
static void EncodeString (const String &str, String *out)
 
- Static Protected Member Functions inherited from System::Xml::XmlBase
static const TCHAR * SkipWhiteSpace (const TCHAR *)
 
static RLIB_INLINE bool IsWhiteSpace (TCHAR c)
 
static RLIB_INLINE bool IsWhiteSpace (int c)
 
static const TCHAR * ReadName (const TCHAR *p, String *name)
 
static const TCHAR * ReadText (const TCHAR *in, String *text, bool ignoreWhiteSpace, const TCHAR *endTag, bool ignoreCase)
 
static const TCHAR * GetEntity (const TCHAR *in, TCHAR *value, int *length)
 
static RLIB_INLINE const TCHAR * GetChar (const TCHAR *p, TCHAR *_value, int *length)
 
static bool StringEqual (const TCHAR *p, const TCHAR *endTag, bool ignoreCase)
 
static int IsAlpha (TCHAR anyByte)
 
static int IsAlphaNum (TCHAR anyByte)
 
static RLIB_INLINE int ToLower (int v)
 

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 XmlNode can be queried, and it can be cast to its more defined type.

Member Function Documentation

XmlNode* System::Xml::XmlNode::FirstChild ( const TCHAR *  _value)
inline

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

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


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