<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Given an attribute name, <aclass="el"href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d"title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <br/></td></tr>
<tr><tdclass="memItemLeft"align="right"valign="top">const char * </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classTiXmlElement.html#a0ed8348fdc56b72a6b4900ce5bac1849">Attribute</a> (const char *name, int *i) const </td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Given an attribute name, <aclass="el"href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d"title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <ahref="#a0ed8348fdc56b72a6b4900ce5bac1849"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Given an attribute name, <aclass="el"href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d"title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <ahref="#aeaff99d4f0ea5b34f7aee202aad457ba"></a><br/></td></tr>
<tr><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute</a> (const char *name, int *_value) const </td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">QueryIntAttribute examines the attribute - it is an alternative to the <aclass="el"href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d"title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> method with richer error checking. <ahref="#aea0bfe471380f281c5945770ddbf52b9"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">QueryUnsignedAttribute examines the attribute - see <aclass="el"href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9"title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">QueryBoolAttribute examines the attribute - see <aclass="el"href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9"title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <ahref="#af4a1d3f88c28eb0f3115dc39ebd83fff"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">QueryDoubleAttribute examines the attribute - see <aclass="el"href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9"title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">QueryFloatAttribute examines the attribute - see <aclass="el"href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9"title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">QueryStringAttribute examines the attribute - see <aclass="el"href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9"title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <br/></td></tr>
<tr><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<tr><tdclass="memTemplItemLeft"align="right"valign="top">int </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">QueryValueAttribute</a> (const std::string &name, T *outValue) const </td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Template form of the attribute query which will try to read the attribute into the specified type. <ahref="#ae3b9a03b0a56663a40801c7256683576"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets an attribute of name to a given value. <ahref="#abf0b3bd7f0e4c746a89ec6e7f101fc32"></a><br/></td></tr>
<tr><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classTiXmlElement.html#ace6f4be75e373726d4774073d666d1a7">SetAttribute</a> (const char *name, int value)</td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets an attribute of name to a given value. <ahref="#ace6f4be75e373726d4774073d666d1a7"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets an attribute of name to a given value. <ahref="#a0d1dd975d75496778177e35abfe0ec0b"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Convenience function for easy access to the text inside an element. <ahref="#af3282294986cdb216646ea1f67af2c87"></a><br/></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a new Element and returns it - the returned element is a copy. <br/></td></tr>
<tr><tdclass="memItemLeft"align="right"valign="top">virtual void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classTiXmlElement.html#afbf52736e70fc91ec9d760721d6f4fd2">Print</a> (FILE *cfile, int depth) const </td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. <ahref="#afbf52736e70fc91ec9d760721d6f4fd2"></a><br/></td></tr>
<p>It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes. </p>
<p>Given an attribute name, <aclass="el"href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d"title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. </p>
<p>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. </p>
<p>Given an attribute name, <aclass="el"href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d"title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. </p>
<p>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. </p>
<p>Convenience function for easy access to the text inside an element. </p>
<p>Although easy and concise, <aclass="el"href="classTiXmlElement.html#af3282294986cdb216646ea1f67af2c87"title="Convenience function for easy access to the text inside an element.">GetText()</a> is limited compared to getting the <aclass="el"href="classTiXmlText.html"title="XML text.">TiXmlText</a> child and accessing it directly.</p>
<p>If the first child of 'this' is a <aclass="el"href="classTiXmlText.html"title="XML text.">TiXmlText</a>, the <aclass="el"href="classTiXmlElement.html#af3282294986cdb216646ea1f67af2c87"title="Convenience function for easy access to the text inside an element.">GetText()</a> returns the character string of the Text node, else null is returned.</p>
<p>This is a convenient method for getting the text of simple contained text: </p>
</pre></div><p>'str' will be a pointer to "This is text".</p>
<p>Note that this function can be misleading. If the element foo was created from this XML: </p>
<divclass="fragment"><preclass="fragment">
<foo><b>This is text</b></foo>
</pre></div><p>then the value of str would be null. The first child node isn't a text node, it is another element. From this XML: </p>
<divclass="fragment"><preclass="fragment">
<foo>This is <b>text</b></foo>
</pre></div><p><aclass="el"href="classTiXmlElement.html#af3282294986cdb216646ea1f67af2c87"title="Convenience function for easy access to the text inside an element.">GetText()</a> will return "This is ".</p>
<p>WARNING: <aclass="el"href="classTiXmlElement.html#af3282294986cdb216646ea1f67af2c87"title="Convenience function for easy access to the text inside an element.">GetText()</a> accesses a child node - don't become confused with the similarly named <aclass="el"href="classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13">TiXmlHandle::Text()</a> and <aclass="el"href="classTiXmlNode.html#a3ddfbcac78fbea041fad57e5c6d60a03"title="Cast to a more defined type. Will return null if not of the requested type.">TiXmlNode::ToText()</a> which are safe type casts on the referenced node. </p>
<p>QueryBoolAttribute examines the attribute - see <aclass="el"href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9"title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. </p>
<p>Note that '1', 'true', or 'yes' are considered true, while '0', 'false' and 'no' are considered false. </p>
<p>QueryIntAttribute examines the attribute - it is an alternative to the <aclass="el"href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d"title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> method with richer error checking. </p>
<p>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. </p>