Logo Search packages:      
Sourcecode: lame version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Friends

TiXmlElement Class Reference

#include <tinyxml.h>

Inheritance diagram for TiXmlElement:
Inheritance graph
[legend]
Collaboration diagram for TiXmlElement:
Collaboration graph
[legend]

List of all members.

Public Types

enum  NodeType {
  DOCUMENT, ELEMENT, COMMENT, UNKNOWN,
  TEXT, DECLARATION, TYPECOUNT
}

Public Member Functions

const std::string * Attribute (const std::string &name) const
const std::string * Attribute (const std::string &name, int *i) const
void Clear ()
 Delete all the children of this node. Does not affect 'this'.
virtual TiXmlNodeClone () const
TiXmlAttributeFirstAttribute () const
 Access the first attribute in this element.
TiXmlNodeFirstChild () const
 The first child of this node. Will be null if there are no children.
TiXmlNodeFirstChild (const std::string &value) const
 The first child of this node with the matching 'value'. Will be null if none found.
TiXmlElementFirstChildElement () const
 Convenience function to get through elements.
TiXmlElementFirstChildElement (const std::string &value) const
 Convenience function to get through elements.
TiXmlDocumentGetDocument () const
TiXmlNodeInsertAfterChild (TiXmlNode *afterThis, const TiXmlNode &addThis)
TiXmlNodeInsertBeforeChild (TiXmlNode *beforeThis, const TiXmlNode &addThis)
TiXmlNodeInsertEndChild (const TiXmlNode &addThis)
TiXmlNodeIterateChildren (TiXmlNode *previous) const
 The last child of this node matching 'value'. Will be null if there are no children.
TiXmlNodeIterateChildren (const std::string &value, TiXmlNode *previous) const
 This flavor of IterateChildren searches for children with a particular 'value'.
TiXmlAttributeLastAttribute () const
 Access the last attribute in this element.
TiXmlNodeLastChild () const
TiXmlNodeLastChild (const std::string &value) const
 The last child of this node. Will be null if there are no children.
TiXmlNodeNextSibling (const std::string &) const
 Navigate to a sibling node with the given 'value'.
TiXmlNodeNextSibling () const
 Navigate to a sibling node.
TiXmlElementNextSiblingElement () const
TiXmlElementNextSiblingElement (const std::string &) const
bool NoChildren () const
 Returns true if this node has no children.
TiXmlNodeParent () const
 One step up the DOM.
TiXmlNodePreviousSibling (const std::string &) const
 Navigate to a sibling node.
TiXmlNodePreviousSibling () const
 Navigate to a sibling node.
virtual void Print (FILE *cfile, int depth) const
void RemoveAttribute (const std::string &name)
bool RemoveChild (TiXmlNode *removeThis)
 Delete a child of this node.
TiXmlNodeReplaceChild (TiXmlNode *replaceThis, const TiXmlNode &withThis)
void SetAttribute (const std::string &name, int value)
void SetAttribute (const std::string &name, const std::string &value)
void SetValue (const std::string &_value)
virtual void StreamIn (std::istream *in, std::string *tag)
virtual void StreamOut (std::ostream *out) const
 TiXmlElement (const std::string &value)
 Construct an element.
TiXmlCommentToComment () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlDeclarationToDeclaration () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlDocumentToDocument () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlElementToElement () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlTextToText () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlUnknownToUnknown () const
 Cast to a more defined type. Will return null not of the requested type.
virtual int Type () const
 Query the type (as an enumerated value, above) of this node.
const std::string & Value () const

Static Public Member Functions

static bool IsWhiteSpaceCondensed ()
 Return the current white space setting.
static void SetCondenseWhiteSpace (bool condense)

Protected Types

enum  {
  TIXML_NO_ERROR = 0, TIXML_ERROR, TIXML_ERROR_OPENING_FILE, TIXML_ERROR_OUT_OF_MEMORY,
  TIXML_ERROR_PARSING_ELEMENT, TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, TIXML_ERROR_READING_ELEMENT_VALUE, TIXML_ERROR_READING_ATTRIBUTES,
  TIXML_ERROR_PARSING_EMPTY, TIXML_ERROR_READING_END_TAG, TIXML_ERROR_PARSING_UNKNOWN, TIXML_ERROR_PARSING_COMMENT,
  TIXML_ERROR_PARSING_DECLARATION, TIXML_ERROR_DOCUMENT_EMPTY, TIXML_ERROR_STRING_COUNT
}

Protected Member Functions

void CopyToClone (TiXmlNode *target) const
TiXmlNodeIdentify (const char *start)
TiXmlNodeLinkEndChild (TiXmlNode *addThis)
virtual const char * Parse (const char *p)
bool ReadValue (std::istream *in)
const char * ReadValue (const char *in)

Static Protected Member Functions

static const char * GetChar (const char *p, char *value)
static const char * GetEntity (const char *in, char *value)
static bool IsWhiteSpace (int c)
static void PutString (const std::string &str, std::ostream *stream)
static const char * ReadName (const char *, std::string *name)
static const char * ReadText (const char *in, std::string *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase)
static const char * SkipWhiteSpace (const char *)
static bool StreamTo (std::istream *in, int character, std::string *tag)
static bool StreamWhiteSpace (std::istream *in, std::string *tag)
static bool StringEqual (const char *p, const char *endTag, bool ignoreCase)

Protected Attributes

TiXmlNodefirstChild
TiXmlNodelastChild
TiXmlNodenext
TiXmlNodeparent
TiXmlNodeprev
NodeType type
std::string value

Static Protected Attributes

static const char * errorString [TIXML_ERROR_STRING_COUNT]

Private Attributes

TiXmlAttributeSet attributeSet

Friends

std::ostream & operator<< (std::ostream &out, const TiXmlNode &base)
std::istream & operator>> (std::istream &in, TiXmlNode &base)

Detailed Description

The element is a container class. It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes.

Definition at line 523 of file tinyxml.h.


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

Generated by  Doxygen 1.6.0   Back to index