Go to the documentation of this file.
27 #if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__)
35 #if defined(_MSC_VER) && (_MSC_VER >= 1400) && (!defined WINCE)
44 static inline int TIXML_SNPRINTF(
char* buffer,
size_t size,
const char* format, ...)
48 const int result = vsnprintf_s(buffer, size, _TRUNCATE, format, va);
53 static inline int TIXML_VSNPRINTF(
char* buffer,
size_t size,
const char* format, va_list va)
55 const int result = vsnprintf_s(buffer, size, _TRUNCATE, format, va);
59 # define TIXML_VSCPRINTF _vscprintf
60 # define TIXML_SSCANF sscanf_s
61 #elif defined _MSC_VER
63 # define TIXML_SNPRINTF _snprintf
64 # define TIXML_VSNPRINTF _vsnprintf
65 # define TIXML_SSCANF sscanf
66 # if (_MSC_VER < 1400) && (!defined WINCE)
68 # define TIXML_VSCPRINTF \
69 _vscprintf // VS2003's C runtime has this, but VC6 C runtime or WinCE SDK doesn't have.
78 char* str =
new char[len]();
79 const int required = _vsnprintf(str, len, format, va);
95 # define TIXML_SNPRINTF snprintf
96 # define TIXML_VSNPRINTF vsnprintf
99 int len = vsnprintf(0, 0, format, va);
103 # define TIXML_SSCANF sscanf
107 # define TIXML_FSEEK _fseeki64
108 # define TIXML_FTELL _ftelli64
109 #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__ANDROID__)
110 # define TIXML_FSEEK fseeko
111 # define TIXML_FTELL ftello
112 #elif defined(__unix__) && defined(__x86_64__)
113 # define TIXML_FSEEK fseeko64
114 # define TIXML_FTELL ftello64
116 # define TIXML_FSEEK fseek
117 # define TIXML_FTELL ftell
201 size_t len = strlen(str);
203 _start =
new char[len + 1];
204 memcpy(
_start, str, len + 1);
217 const char endChar = *endTag;
218 size_t length = strlen(endTag);
223 if (*p == endChar && strncmp(p, endTag, length) == 0)
225 Set(start, p, strFlags);
250 char*
const start = p;
349 const int buflen = 10;
350 char buf[buflen] = {0};
370 bool entityFound =
false;
375 *(p + entity.
length + 1) ==
';')
422 static const char* defTrue =
"true";
423 static const char* defFalse =
"false";
435 const unsigned char* pu =
reinterpret_cast<const unsigned char*
>(p);
450 const unsigned long BYTE_MASK = 0xBF;
451 const unsigned long BYTE_MARK = 0x80;
452 const unsigned long FIRST_BYTE_MARK[7] = {0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC};
458 else if (input < 0x800)
462 else if (input < 0x10000)
466 else if (input < 0x200000)
484 *output =
static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
489 *output =
static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
494 *output =
static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
499 *output =
static_cast<char>(input | FIRST_BYTE_MARK[*length]);
512 if (*(p + 1) ==
'#' && *(p + 2))
514 unsigned long ucs = 0;
518 static const char SEMICOLON =
';';
523 const char* q = p + 3;
529 q = strchr(q, SEMICOLON);
542 unsigned int digit = 0;
544 if (*q >=
'0' && *q <=
'9')
548 else if (*q >=
'a' && *q <=
'f')
550 digit = *q -
'a' + 10;
552 else if (*q >=
'A' && *q <=
'F')
554 digit = *q -
'A' + 10;
561 TIXMLASSERT(digit == 0 || mult <= UINT_MAX / digit);
562 const unsigned int digitScaled = mult * digit;
573 const char* q = p + 2;
579 q = strchr(q, SEMICOLON);
592 if (*q >=
'0' && *q <=
'9')
594 const unsigned int digit = *q -
'0';
596 TIXMLASSERT(digit == 0 || mult <= UINT_MAX / digit);
597 const unsigned int digitScaled = mult * digit;
612 return p + delta + 1;
654 TIXML_SNPRINTF(buffer, bufferSize,
"%lld",
static_cast<long long>(v));
670 *value =
static_cast<int>(v);
696 if (
ToInt(str, &ival))
698 *value = (ival == 0) ?
false :
true;
701 static const char* TRUE_VALS[] = {
"true",
"True",
"TRUE", 0};
702 static const char* FALSE_VALS[] = {
"false",
"False",
"FALSE", 0};
704 for (
int i = 0; TRUE_VALS[i]; ++i)
712 for (
int i = 0; FALSE_VALS[i]; ++i)
748 unsigned long long v = 0;
751 *value =
static_cast<int64_t
>(v);
760 *value =
static_cast<int64_t
>(v);
770 unsigned long long v = 0;
773 *value = (uint64_t)v;
784 char*
const start = p;
795 static const char* xmlHeader = {
"<?"};
796 static const char* commentHeader = {
"<!--"};
797 static const char* cdataHeader = {
"<![CDATA["};
798 static const char* dtdHeader = {
"<!"};
799 static const char* elementHeader = {
"<"};
801 static const int xmlHeaderLen = 2;
802 static const int commentHeaderLen = 4;
803 static const int cdataHeaderLen = 9;
804 static const int dtdHeaderLen = 2;
805 static const int elementHeaderLen = 1;
812 returnNode = CreateUnlinkedNode<XMLDeclaration>(
_commentPool);
818 returnNode = CreateUnlinkedNode<XMLComment>(
_commentPool);
820 p += commentHeaderLen;
832 returnNode = CreateUnlinkedNode<XMLUnknown>(
_commentPool);
838 returnNode = CreateUnlinkedNode<XMLElement>(
_elementPool);
840 p += elementHeaderLen;
844 returnNode = CreateUnlinkedNode<XMLText>(
_textPool);
864 if (!node->Accept(visitor))
1065 if (afterThis->
_parent !=
this)
1070 if (afterThis == addThis)
1079 if (afterThis->
_next == 0)
1085 addThis->
_prev = afterThis;
1088 afterThis->
_next = addThis;
1187 p = node->
ParseDeep(p, &endTag, curLineNumPtr);
1209 bool wellLocated =
false;
1249 bool mismatch =
false;
1390 return visitor->
Visit(*
this);
1440 return visitor->
Visit(*
this);
1493 return visitor->
Visit(*
this);
1541 return visitor->
Visit(*
this);
1574 if (*p !=
'\"' && *p !=
'\'')
1579 const char endTag[2] = {*p, 0};
1729 , _closingType(OPEN)
1775 int i = defaultValue;
1782 unsigned i = defaultValue;
1789 int64_t i = defaultValue;
1796 uint64_t i = defaultValue;
1803 bool b = defaultValue;
1810 double d = defaultValue;
1817 float f = defaultValue;
1836 if (node && node->
ToText())
1838 return node->
Value();
2017 int i = defaultValue;
2024 unsigned i = defaultValue;
2031 int64_t i = defaultValue;
2038 uint64_t i = defaultValue;
2045 bool b = defaultValue;
2052 double d = defaultValue;
2059 float f = defaultValue;
2083 last->
_next = attrib;
2157 prevAttribute->
_next = attrib;
2164 prevAttribute = attrib;
2173 else if (*p ==
'/' && *(p + 1) ==
'>')
2195 pool->
Free(attribute);
2328 if (!node->Accept(visitor))
2343 "XML_WRONG_ATTRIBUTE_TYPE",
2344 "XML_ERROR_FILE_NOT_FOUND",
2345 "XML_ERROR_FILE_COULD_NOT_BE_OPENED",
2346 "XML_ERROR_FILE_READ_ERROR",
2347 "XML_ERROR_PARSING_ELEMENT",
2348 "XML_ERROR_PARSING_ATTRIBUTE",
2349 "XML_ERROR_PARSING_TEXT",
2350 "XML_ERROR_PARSING_CDATA",
2351 "XML_ERROR_PARSING_COMMENT",
2352 "XML_ERROR_PARSING_DECLARATION",
2353 "XML_ERROR_PARSING_UNKNOWN",
2354 "XML_ERROR_EMPTY_DOCUMENT",
2355 "XML_ERROR_MISMATCHED_ELEMENT",
2356 "XML_ERROR_PARSING",
2357 "XML_CAN_NOT_CONVERT_TEXT",
2359 "XML_ELEMENT_DEPTH_EXCEEDED"};
2365 , _processEntities(processEntities)
2367 , _whitespaceMode(whitespaceMode)
2371 , _parseCurLineNum(0)
2395 for (
int i = 0; i <
_unlinked.Size(); ++i)
2413 #ifdef TINYXML2_DEBUG
2414 const bool hadError =
Error();
2429 #ifdef TINYXML2_DEBUG
2483 dec->
SetValue(str ? str :
"xml version=\"1.0\" encoding=\"UTF-8\"");
2495 static FILE*
callfopen(
const char* filepath,
const char* mode)
2499 #if defined(_MSC_VER) && (_MSC_VER >= 1400) && (!defined WINCE)
2501 const errno_t err = fopen_s(&fp, filepath, mode);
2507 FILE* fp = fopen(filepath, mode);
2559 if (fgetc(fp) == EOF && ferror(fp) != 0)
2567 unsigned long long filelength;
2569 const long long fileLengthSigned =
TIXML_FTELL(fp);
2571 if (fileLengthSigned == -1L)
2577 filelength =
static_cast<unsigned long long>(fileLengthSigned);
2580 const size_t maxSizeT =
static_cast<size_t>(-1);
2583 if (filelength >=
static_cast<unsigned long long>(maxSizeT))
2590 if (filelength == 0)
2596 const size_t size =
static_cast<size_t>(filelength);
2599 const size_t read = fread(
_charBuffer, 1, size, fp);
2649 if (len == 0 || !p || !*p)
2654 if (len ==
static_cast<size_t>(-1))
2708 const size_t BUFFER_SIZE = 1000;
2709 char* buffer =
new char[BUFFER_SIZE];
2714 "Error=%s ErrorID=%d (0x%x) Line number=%d",
2722 size_t len = strlen(buffer);
2724 len = strlen(buffer);
2727 va_start(va, format);
2793 : _elementJustOpened(false)
2795 , _firstElement(true)
2799 , _processEntities(true)
2800 , _compactMode(compact)
2811 const unsigned char flagIndex =
static_cast<unsigned char>(entityValue);
2826 va_start(va, format);
2830 vfprintf(
_fp, format, va);
2838 va_start(va, format);
2851 fwrite(data,
sizeof(
char), size,
_fp);
2856 memcpy(p, data, size);
2879 for (
int i = 0; i < depth; ++i)
2903 if (flag[
static_cast<unsigned char>(*q)])
2907 const size_t delta = q - p;
2908 const int toPrint = (INT_MAX < delta) ? INT_MAX : static_cast<int>(delta);
2912 bool entityPatternPrinted =
false;
2920 entityPatternPrinted =
true;
2924 if (!entityPatternPrinted)
2939 const size_t delta = q - p;
2940 const int toPrint = (INT_MAX < delta) ? INT_MAX : static_cast<int>(delta);
2956 Write(
reinterpret_cast<const char*
>(bom));
3083 if (
_depth == 0 && !compactMode)
3229 attribute = attribute->
Next();
void DeepCopy(XMLDocument *target) const
virtual void SetTracked()=0
XMLError QueryDoubleText(double *dval) const
See QueryIntText()
virtual void Putc(char ch)
XMLUnknown * InsertNewUnknown(const char *text)
See InsertNewChildElement()
void PushAttribute(const char *name, const char *value)
If streaming, add an attribute to an open element.
static const unsigned char TIXML_UTF_LEAD_0
void ClearError()
Clears the error flags.
XMLUnknown(XMLDocument *doc)
XMLError QueryUnsigned64Attribute(const char *name, uint64_t *value) const
See QueryIntAttribute()
static int TIXML_VSCPRINTF(const char *format, va_list va)
char * ParseDeep(char *p, StrPair *parentEndTag, int *curLineNumPtr)
unsigned UnsignedText(unsigned defaultValue=0) const
See QueryIntText()
bool Error() const
Return true if there was an error parsing the document.
double DoubleAttribute(const char *name, double defaultValue=0) const
See IntAttribute()
virtual void Write(const char *data, size_t size)
const char * Value() const
The value of the attribute.
XMLNode * InsertFirstChild(XMLNode *addThis)
virtual bool ShallowEqual(const XMLNode *compare) const
int64_t Int64Attribute(const char *name, int64_t defaultValue=0) const
See IntAttribute()
const char * Attribute(const char *name, const char *value=0) const
bool CData() const
Returns true if this is a CDATA text element.
virtual XMLNode * ShallowClone(XMLDocument *document) const =0
virtual XMLDeclaration * ToDeclaration()
Safely cast to a Declaration, or null.
char * ParseText(char *in, const char *endTag, int strFlags, int *curLineNumPtr)
static bool ToUnsigned(const char *str, unsigned *value)
XMLAttribute * _rootAttribute
static const char * ErrorIDToName(XMLError errorID)
const char * Value() const
virtual ~XMLDeclaration()
char * ParseDeep(char *p, StrPair *parentEndTag, int *curLineNumPtr)
void SetAttribute(const char *value)
Set the attribute to a string value.
void DeleteAttribute(const char *name)
virtual bool VisitExit(const XMLDocument &)
Visit a document.
char * ParseAttributes(char *p, int *curLineNumPtr)
void PrintString(const char *, bool restrictedEntitySet)
void OpenElement(const char *name, bool compactMode=false)
int IntAttribute(const char *name, int defaultValue=0) const
@ XML_ERROR_PARSING_UNKNOWN
XMLError QueryBoolAttribute(const char *name, bool *value) const
See QueryIntAttribute()
XMLNode * DeepClone(XMLDocument *target) const
bool NoChildren() const
Returns true if this node has no children.
XMLUnknown * NewUnknown(const char *text)
void SetName(const char *str, bool staticMem=false)
Set the name of the element.
@ XML_ERROR_FILE_NOT_FOUND
DynArray< const char *, 10 > _stack
static const char * ReadBOM(const char *p, bool *hasBOM)
@ XML_ERROR_FILE_COULD_NOT_BE_OPENED
@ XML_WRONG_ATTRIBUTE_TYPE
MemPoolT< sizeof(XMLElement)> _elementPool
void SetAttribute(const char *name, const char *value)
Sets the named attribute to value.
static bool ToUnsigned64(const char *str, uint64_t *value)
@ NEEDS_WHITESPACE_COLLAPSING
static const char CARRIAGE_RETURN
XMLError LoadFile(const char *filename)
virtual XMLNode * ShallowClone(XMLDocument *document) const
XMLText * InsertNewText(const char *text)
See InsertNewChildElement()
@ XML_ERROR_PARSING_DECLARATION
const XMLElement * PreviousSiblingElement(const char *name=0) const
Get the previous (left) sibling element of this node, with an optionally supplied name.
@ XML_ERROR_FILE_READ_ERROR
const XMLElement * NextSiblingElement(const char *name=0) const
Get the next (right) sibling element of this node, with an optionally supplied name.
MemPoolT< sizeof(XMLComment)> _commentPool
@ ATTRIBUTE_VALUE_LEAVE_ENTITIES
static const unsigned char TIXML_UTF_LEAD_2
@ XML_ERROR_PARSING_ELEMENT
char * ParseName(char *in)
XMLError QueryInt64Attribute(const char *name, int64_t *value) const
See QueryIntAttribute()
static bool ToInt(const char *str, int *value)
Whitespace WhitespaceMode() const
static void DeleteNode(XMLNode *node)
@ NEEDS_NEWLINE_NORMALIZATION
virtual bool VisitExit(const XMLDocument &)
Visit a document.
void Unlink(XMLNode *child)
static FILE * callfopen(const char *filepath, const char *mode)
XMLAttribute * FindOrCreateAttribute(const char *name)
char * ParseDeep(char *p, StrPair *parentEndTag, int *curLineNumPtr)
XMLNode * InsertAfterChild(XMLNode *afterThis, XMLNode *addThis)
XMLElement * NewElement(const char *name)
static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length)
XMLAttribute * CreateAttribute()
void MarkInUse(const XMLNode *const)
XMLError QueryIntText(int *ival) const
const XMLNode * NextSibling() const
Get the next (right) sibling node of this node.
static const int TINYXML2_MAX_ELEMENT_DEPTH
void DeleteChild(XMLNode *node)
const char * GetText() const
char * Identify(char *p, XMLNode **node)
const XMLDocument * GetDocument() const
Get the XMLDocument that owns this XMLNode.
XMLError QueryUnsigned64Text(uint64_t *uval) const
See QueryIntText()
@ XML_ERROR_PARSING_COMMENT
virtual bool VisitEnter(const XMLDocument &)
Visit a document.
XMLError SaveFile(const char *filename, bool compact=false)
void Set(char *start, char *end, int flags)
static const unsigned char TIXML_UTF_LEAD_1
virtual void PrintSpace(int depth)
bool ProcessEntities() const
char * ParseDeep(char *p, bool processEntities, int *curLineNumPtr)
void PrintError() const
A (trivial) utility function that prints the ErrorStr() to stdout.
void PrepareForNewNode(bool compactMode)
static const char * GetCharacterRef(const char *p, char *value, int *length)
XMLDeclaration(XMLDocument *doc)
ElementClosingType _closingType
static const char * writeBoolTrue
virtual XMLUnknown * ToUnknown()
Safely cast to an Unknown, or null.
bool _entityFlag[ENTITY_RANGE]
const XMLAttribute * FirstAttribute() const
Return the first attribute in the list.
XMLError QueryUnsignedValue(unsigned int *value) const
See QueryIntValue.
@ TEXT_ELEMENT_LEAVE_ENTITIES
XMLError QueryInt64Value(int64_t *value) const
See QueryIntValue.
DynArray< char, 20 > _buffer
static bool IsNameStartChar(unsigned char ch)
XMLError QueryDoubleValue(double *value) const
See QueryIntValue.
XMLElement * InsertNewChildElement(const char *name)
unsigned UnsignedAttribute(const char *name, unsigned defaultValue=0) const
See IntAttribute()
float FloatText(float defaultValue=0) const
See QueryIntText()
virtual void CloseElement(bool compactMode=false)
If streaming, close the Element.
XMLError QueryBoolValue(bool *value) const
See QueryIntValue.
virtual bool ShallowEqual(const XMLNode *compare) const
DynArray< XMLNode *, 10 > _unlinked
bool BoolText(bool defaultValue=false) const
See QueryIntText()
void Clear()
Clear the document, resetting it to the initial state.
int IntText(int defaultValue=0) const
const XMLNode * FirstChild() const
Get the first child node, or null if none exists.
static const char * writeBoolFalse
void SetError(XMLError error, int lineNum, const char *format,...)
const XMLAttribute * FindAttribute(const char *name) const
Query a specific attribute in the list.
void SetInternedStr(const char *str)
const char * ErrorStr() const
XMLError QueryInt64Text(int64_t *uval) const
See QueryIntText()
static const char SINGLE_QUOTE
void SetCData(bool isCData)
Declare whether this should be CDATA or standard text.
XMLError QueryBoolText(bool *bval) const
See QueryIntText()
ElementClosingType ClosingType() const
void TransferTo(StrPair *other)
const XMLNode * Parent() const
Get the parent of this node on the DOM.
MemPoolT< sizeof(XMLAttribute)> _attributePool
@ XML_ERROR_PARSING_CDATA
virtual bool Accept(XMLVisitor *visitor) const
virtual bool CompactMode(const XMLElement &)
XMLError QueryFloatValue(float *value) const
See QueryIntValue.
XMLError QueryDoubleAttribute(const char *name, double *value) const
See QueryIntAttribute()
virtual XMLElement * ToElement()
Safely cast to an Element, or null.
uint64_t Unsigned64Attribute(const char *name, uint64_t defaultValue=0) const
See IntAttribute()
virtual bool ShallowEqual(const XMLNode *compare) const
void SetStr(const char *str, int flags=0)
const XMLElement * ToElementWithName(const char *name) const
int64_t Int64Text(int64_t defaultValue=0) const
See QueryIntText()
static bool IsPrefixHex(const char *p)
void PushDeclaration(const char *value)
XMLError QueryUnsignedAttribute(const char *name, unsigned int *value) const
See QueryIntAttribute()
@ XML_ERROR_PARSING_ATTRIBUTE
void InsertChildPreamble(XMLNode *insertThis) const
void Print(XMLPrinter *streamer=0) const
const XMLNode * LastChild() const
Get the last child node, or null if none exists.
void PushComment(const char *comment)
Add a comment.
MemPoolT< sizeof(XMLText)> _textPool
static bool ToFloat(const char *str, float *value)
virtual XMLNode * ShallowClone(XMLDocument *document) const
XMLError QueryUnsigned64Value(uint64_t *value) const
See QueryIntValue.
static const char DOUBLE_QUOTE
static bool ToBool(const char *str, bool *value)
const char * ErrorName() const
XMLDeclaration * InsertNewDeclaration(const char *text)
See InsertNewChildElement()
virtual XMLNode * ShallowClone(XMLDocument *document) const
static void ToStr(int v, char *buffer, int bufferSize)
void SetValue(const char *val, bool staticMem=false)
static bool ToDouble(const char *str, double *value)
const XMLElement * LastChildElement(const char *name=0) const
static const int NUM_ENTITIES
virtual void Free(void *)=0
void SetName(const char *name)
virtual void Print(const char *format,...)
bool BoolAttribute(const char *name, bool defaultValue=false) const
See IntAttribute()
static bool IsWhiteSpace(char p)
void PushUnknown(const char *value)
virtual bool ShallowEqual(const XMLNode *compare) const
virtual XMLText * ToText()
Safely cast to Text, or null.
XMLError QueryIntAttribute(const char *name, int *value) const
virtual bool Accept(XMLVisitor *visitor) const
static bool StringEqual(const char *p, const char *q, int nChar=INT_MAX)
XMLPrinter(FILE *file=0, bool compact=false, int depth=0)
uint64_t Unsigned64Text(uint64_t defaultValue=0) const
See QueryIntText()
static bool ToInt64(const char *str, int64_t *value)
virtual bool Accept(XMLVisitor *visitor) const
@ XML_CAN_NOT_CONVERT_TEXT
@ XML_ELEMENT_DEPTH_EXCEEDED
virtual XMLComment * ToComment()
Safely cast to a Comment, or null.
static void SetBoolSerialization(const char *writeTrue, const char *writeFalse)
virtual bool VisitEnter(const XMLDocument &)
Visit a document.
const char * Name() const
The name of the attribute.
static const Entity entities[NUM_ENTITIES]
XMLError QueryFloatText(float *fval) const
See QueryIntText()
@ NEEDS_ENTITY_PROCESSING
virtual XMLDocument * ToDocument()
Safely cast to a Document, or null.
static const char LINE_FEED
static const char * SkipWhiteSpace(const char *p, int *curLineNumPtr)
virtual bool Accept(XMLVisitor *visitor) const
virtual XMLNode * ShallowClone(XMLDocument *document) const
virtual bool Visit(const XMLText &text)
Visit a text node.
void SealElementIfJustOpened()
@ XML_ERROR_MISMATCHED_ELEMENT
XMLNode * InsertEndChild(XMLNode *addThis)
XMLText * NewText(const char *text)
void CollapseWhitespace()
void DeleteNode(XMLNode *node)
static bool IsNameChar(unsigned char ch)
static const char * _errorNames[XML_ERROR_COUNT]
virtual bool Accept(XMLVisitor *visitor) const
XMLComment * InsertNewComment(const char *comment)
See InsertNewChildElement()
virtual bool Visit(const XMLDeclaration &)
Visit a declaration.
void PushHeader(bool writeBOM, bool writeDeclaration)
XMLDeclaration * NewDeclaration(const char *text=0)
XMLError QueryFloatAttribute(const char *name, float *value) const
See QueryIntAttribute()
double DoubleText(double defaultValue=0) const
See QueryIntText()
virtual char * ParseDeep(char *p, StrPair *parentEndTag, int *curLineNumPtr)
bool _restrictedEntityFlag[ENTITY_RANGE]
@ XML_ERROR_EMPTY_DOCUMENT
XMLError QueryUnsignedText(unsigned *uval) const
See QueryIntText()
char * ParseDeep(char *p, StrPair *parentEndTag, int *curLineNumPtr)
XMLComment * NewComment(const char *comment)
void PushText(const char *text, bool cdata=false)
Add a text node.
XMLError QueryIntValue(int *value) const
const XMLElement * FirstChildElement(const char *name=0) const
const XMLAttribute * Next() const
The next attribute in the list.
float FloatAttribute(const char *name, float defaultValue=0) const
See IntAttribute()
const char * Name() const
Get the name of an element (which is the Value() of the node.)
void SetText(const char *inText)