Class XMLElement

#include <Geode/cocos/support/tinyxml2/tinyxml2.h>
classXMLElement:publictinyxml2::XMLNode{ ... }

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.

Examples0
Public static methods0
Public member functions34
charconst*Name()const

/// Get the name of an element (which is the Value() of the node.)

voidSetName(,
boolstaticMem
)

/// Set the name of the element.

virtualtinyxml2::XMLElement*ToElement()
No description provided
virtualtinyxml2::XMLElementconst*ToElement()const
No description provided
virtualboolAccept()const
No description provided
charconst*Attribute(,)const

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

intIntAttribute()const

Given an attribute name, IntAttribute() returns the value of the attribute interpreted as an integer. 0 will be returned if there is an error. For a method with error checking, see QueryIntAttribute()

uintUnsignedAttribute()const

/// See IntAttribute()

boolBoolAttribute()const

/// See IntAttribute()

doubleDoubleAttribute()const

/// See IntAttribute()

floatFloatAttribute()const

/// See IntAttribute()

tinyxml2::XMLErrorQueryIntAttribute(,
int*value
)
const

Given an attribute name, QueryIntAttribute() returns XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion can’t be performed, or XML_NO_ATTRIBUTE if the attribute doesn’t exist. If successful, the result of the conversion will be written to ‘value’. If not successful, nothing will be written to ‘value’. This allows you to provide default value:

tinyxml2::XMLErrorQueryUnsignedAttribute(,
uint*value
)
const

/// See QueryIntAttribute()

tinyxml2::XMLErrorQueryBoolAttribute(,
bool*value
)
const

/// See QueryIntAttribute()

tinyxml2::XMLErrorQueryDoubleAttribute(,
double*value
)
const

/// See QueryIntAttribute()

tinyxml2::XMLErrorQueryFloatAttribute(,
float*value
)
const

/// See QueryIntAttribute()

voidSetAttribute(,)

/// Sets the named attribute to value.

voidSetAttribute(,
intvalue
)

/// Sets the named attribute to value.

voidSetAttribute(,
uintvalue
)

/// Sets the named attribute to value.

voidSetAttribute(,
boolvalue
)

/// Sets the named attribute to value.

voidSetAttribute(,
doublevalue
)

/// Sets the named attribute to value.

voidDeleteAttribute()

Delete an attribute.

tinyxml2::XMLAttributeconst*FirstAttribute()const

/// Return the first attribute in the list.

tinyxml2::XMLAttributeconst*FindAttribute()const

/// Query a specific attribute in the list.

charconst*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:

tinyxml2::XMLErrorQueryIntText(
int*ival
)
const

Convenience method to query the value of a child text node. This is probably best shown by example. Given you have a document is this form:

Return value
XML_SUCCESS (0) on success, XML_CAN_NOT_CONVERT_TEXT if the text cannot be converted to the requested type, and XML_NO_TEXT_NODE if there is no child text to query.
tinyxml2::XMLErrorQueryUnsignedText(
uint*uval
)
const

/// See QueryIntText()

tinyxml2::XMLErrorQueryBoolText(
bool*bval
)
const

/// See QueryIntText()

tinyxml2::XMLErrorQueryDoubleText()const

/// See QueryIntText()

tinyxml2::XMLErrorQueryFloatText(
float*fval
)
const

/// See QueryIntText()

intClosingType()const
No description provided
virtualchar*ParseDeep(,)
No description provided
virtualtinyxml2::XMLNode*ShallowClone()const
No description provided
virtualboolShallowEqual()const
No description provided
Fields0
Protected member functions0
Protected fields0