An attribute is a name-value pair. Elements have an arbitrary number of attributes, each with a unique name.
Class XMLAttribute
#include <Geode/cocos/support/tinyxml2/tinyxml2.h>
ℹ The attributes are not XMLNodes. You may only query the Next() attribute in a list.
Examples0
Public static methods0
Public member functions19
charconst*Name()const
/// The name of the attribute.
charconst*Value()const
/// The value of the attribute.
tinyxml2::XMLAttributeconst*Next()const
/// The next attribute in the list.
intIntValue()const
IntAttribute interprets the attribute as an integer, and returns the value. If the value isn’t an integer, 0 will be returned. There is no error checking; use QueryIntAttribute() if you need error checking.
uintUnsignedValue()const
/// Query as an unsigned integer. See IntAttribute()
boolBoolValue()const
/// Query as a boolean. See IntAttribute()
doubleDoubleValue()const
/// Query as a double. See IntAttribute()
floatFloatValue()const
/// Query as a float. See IntAttribute()
tinyxml2::XMLErrorQueryIntValue(int*value)const
QueryIntAttribute interprets the attribute as an integer, and returns the value in the provided paremeter. The function will return XML_NO_ERROR on success, and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
tinyxml2::XMLErrorQueryUnsignedValue(uint*value)const
/// See QueryIntAttribute
tinyxml2::XMLErrorQueryBoolValue(bool*value)const
/// See QueryIntAttribute
tinyxml2::XMLErrorQueryDoubleValue(double*value)const
/// See QueryIntAttribute
tinyxml2::XMLErrorQueryFloatValue(float*value)const
/// See QueryIntAttribute
voidSetAttribute(charconst*value)
/// Set the attribute to a string value.