class TiXmlElement

The element is a container class. More...

Full nameTelEngine::TiXmlElement
Definition#include <libs/yxml/tinyxml.h>
InheritsTelEngine::TiXmlNode [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


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.

 TiXmlElement (const char * in_value)

TiXmlElement

 TiXmlElement ( const std::string& _value )

TiXmlElement

 TiXmlElement ( const TiXmlElement& )

TiXmlElement

void  operator= ( const TiXmlElement& base )

operator=

Reimplemented from TiXmlNode.

 ~TiXmlElement ()

~TiXmlElement

[virtual]

const char*  Attribute ( const char* name )

Attribute

[const]

Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists.

const char*  Attribute ( const char* name, int* i )

Attribute

[const]

Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. If the attribute exists and can be converted to an integer, the integer value will be put in the return 'i', if 'i' is non-null.

const char*  Attribute ( const char* name, double* d )

Attribute

[const]

Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. If the attribute exists and can be converted to an double, the double value will be put in the return 'd', if 'd' is non-null.

int  QueryIntAttribute ( const char* name, int* _value )

QueryIntAttribute

[const]

QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer error checking. If the attribute is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE. If the attribute does not exist, then TIXML_NO_ATTRIBUTE is returned.

int  QueryDoubleAttribute ( const char* name, double* _value )

QueryDoubleAttribute

[const]

int  QueryFloatAttribute ( const char* name, float* _value )

QueryFloatAttribute

[const]

void  SetAttribute ( const char* name, const char * _value )

SetAttribute

Sets an attribute of name to a given value. The attribute will be created if it does not exist, or changed if it does.

const char*  Attribute ( const std::string& name )

Attribute

[const]

const char*  Attribute ( const std::string& name, int* i )

Attribute

[const]

const char*  Attribute ( const std::string& name, double* d )

Attribute

[const]

int  QueryIntAttribute ( const std::string& name, int* _value )

QueryIntAttribute

[const]

int  QueryDoubleAttribute ( const std::string& name, double* _value )

QueryDoubleAttribute

[const]

void  SetAttribute ( const std::string& name, const std::string& _value )

SetAttribute

void  SetAttribute ( const std::string& name, int _value )

SetAttribute

void  SetAttribute ( const char * name, int value )

SetAttribute

Sets an attribute of name to a given value. The attribute will be created if it does not exist, or changed if it does.

void  SetDoubleAttribute ( const char * name, double value )

SetDoubleAttribute

Sets an attribute of name to a given value. The attribute will be created if it does not exist, or changed if it does.

void  RemoveAttribute ( const char * name )

RemoveAttribute

Deletes an attribute with the given name.

void  RemoveAttribute ( const std::string& name )

RemoveAttribute

const TiXmlAttribute*  FirstAttribute ()

FirstAttribute

[const]

TiXmlAttribute*  FirstAttribute ()

FirstAttribute

const TiXmlAttribute*  LastAttribute ()

LastAttribute

[const]

TiXmlAttribute*  LastAttribute ()

LastAttribute

const char*  GetText ()

GetText

[const]

Convenience function for easy access to the text inside an element. Although easy and concise, GetText() is limited compared to getting the TiXmlText child and accessing it directly.

If the first child of 'this' is a TiXmlText, the GetText() returns the character string of the Text node, else null is returned.

This is a convenient method for getting the text of simple contained text: @verbatim This is text const char* str = fooElement->GetText(); @endverbatim

'str' will be a pointer to "This is text".

Note that this function can be misleading. If the element foo was created from this XML: @verbatim This is text @endverbatim

then the value of str would be null. The first child node isn't a text node, it is another element. From this XML: @verbatim This is text @endverbatim GetText() will return "This is ".

WARNING: GetText() accesses a child node - don't become confused with the similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are safe type casts on the referenced node.

TiXmlNode*  Clone ()

Clone

[const virtual]

Reimplemented from TiXmlNode.

void  Print ( FILE* cfile, int depth )

Print

[const virtual]

Reimplemented from TiXmlBase.

const char*  Parse ( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )

Parse

[virtual]

Reimplemented from TiXmlBase.

const TiXmlElement*  ToElement ()

ToElement

[const virtual]

Reimplemented from TiXmlNode.

TiXmlElement*  ToElement ()

ToElement

[virtual]

Reimplemented from TiXmlNode.

void  CopyTo ( TiXmlElement* target )

CopyTo

[protected const]

Reimplemented from TiXmlNode.

void  ClearThis ()

ClearThis

[protected]

void  StreamIn ( TIXML_ISTREAM * in, TIXML_STRING * tag )

StreamIn

[protected virtual]

Reimplemented from TiXmlNode.

void  StreamOut ( TIXML_OSTREAM * out, bool unclosed = false )

StreamOut

[const virtual]

Reimplemented from TiXmlBase.

const char*  ReadValue ( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding )

ReadValue


Generated by: paulc on bussard on Wed Oct 21 01:57:30 2009, using kdoc 2.0a54.