Panda3D
|
The element is a container class. More...
Public Member Functions | |
__init__ (const TiXmlElement) | |
__init__ (str in_value) | |
Construct an element. More... | |
__init__ (str _value) | |
std::string constructor. More... | |
str | Attribute (str name) |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. More... | |
str | Attribute (str name) |
TiXmlAttribute | FirstAttribute () |
Access the first attribute in this element. More... | |
const TiXmlAttribute | FirstAttribute () |
Access the last attribute in this element. More... | |
str | GetText () |
Convenience function for easy access to the text inside an element. More... | |
TiXmlAttribute | LastAttribute () |
Access the last attribute in this element. More... | |
const TiXmlAttribute | LastAttribute () |
TiXmlElement | operator= (const TiXmlElement base) |
RemoveAttribute (str name) | |
Deletes an attribute with the given name. More... | |
RemoveAttribute (str name) | |
Access the first attribute in this element. More... | |
SetAttribute (str name, str _value) | |
Sets an attribute of name to a given value. More... | |
SetAttribute (str name, int value) | |
Sets an attribute of name to a given value. More... | |
SetAttribute (str name, int _value) | |
SetAttribute (str name, str _value) | |
STL std::string form. More... | |
SetDoubleAttribute (str name, double value) | |
Sets an attribute of name to a given value. More... | |
SetDoubleAttribute (str name, double value) | |
![]() | |
bool | Accept (TiXmlVisitor visitor) |
Accept a hierchical visit the nodes in the TinyXML DOM. More... | |
Clear () | |
Delete all the children of this node. Does not affect 'this'. More... | |
TiXmlNode | Clone () |
Create an exact duplicate of this node and return it. More... | |
TiXmlNode | FirstChild () |
The first child of this node. Will be null if there are no children. More... | |
const TiXmlNode | FirstChild () |
The first child of this node with the matching 'value'. Will be null if none found. The first child of this node with the matching 'value'. Will be null if none found. More... | |
TiXmlNode | FirstChild (str _value) |
const TiXmlNode | FirstChild (str value) |
STL std::string form. More... | |
TiXmlNode | FirstChild (str _value) |
STL std::string form. More... | |
const TiXmlNode | FirstChild (str _value) |
TiXmlElement | FirstChildElement () |
const TiXmlElement | FirstChildElement () |
Convenience function to get through elements. More... | |
TiXmlElement | FirstChildElement (str _value) |
const TiXmlElement | FirstChildElement (str _value) |
Convenience function to get through elements. More... | |
TiXmlElement | FirstChildElement (str _value) |
STL std::string form. More... | |
const TiXmlElement | FirstChildElement (str _value) |
TiXmlDocument | GetDocument () |
const TiXmlDocument | GetDocument () |
Return a pointer to the Document this node lives in. More... | |
TiXmlNode | InsertAfterChild (TiXmlNode afterThis, const TiXmlNode addThis) |
Add a new node related to this. More... | |
TiXmlNode | InsertBeforeChild (TiXmlNode beforeThis, const TiXmlNode addThis) |
Add a new node related to this. More... | |
TiXmlNode | InsertEndChild (const TiXmlNode addThis) |
Add a new node related to this. More... | |
TiXmlNode | IterateChildren (const TiXmlNode previous) |
const TiXmlNode | IterateChildren (const TiXmlNode previous) |
An alternate way to walk the children of a node. More... | |
TiXmlNode | IterateChildren (str _value, const TiXmlNode previous) |
const TiXmlNode | IterateChildren (str value, const TiXmlNode previous) |
This flavor of IterateChildren searches for children with a particular 'value'. More... | |
TiXmlNode | IterateChildren (str _value, const TiXmlNode previous) |
STL std::string form. More... | |
const TiXmlNode | IterateChildren (str _value, const TiXmlNode previous) |
TiXmlNode | LastChild () |
The last child of this node. Will be null if there are no children. More... | |
const TiXmlNode | LastChild () |
The last child of this node. Will be null if there are no children. More... | |
TiXmlNode | LastChild (str _value) |
The last child of this node matching 'value'. Will be null if there are no children. More... | |
const TiXmlNode | LastChild (str value) |
The last child of this node matching 'value'. Will be null if there are no children. More... | |
TiXmlNode | LastChild (str _value) |
STL std::string form. More... | |
const TiXmlNode | LastChild (str _value) |
TiXmlNode | NextSibling () |
const TiXmlNode | NextSibling () |
Navigate to a sibling node. More... | |
TiXmlNode | NextSibling (str _next) |
const TiXmlNode | NextSibling (str) |
Navigate to a sibling node with the given 'value'. More... | |
TiXmlNode | NextSibling (str _value) |
STL std::string form. More... | |
const TiXmlNode | NextSibling (str _value) |
TiXmlElement | NextSiblingElement () |
const TiXmlElement | NextSiblingElement () |
Convenience function to get through elements. More... | |
TiXmlElement | NextSiblingElement (str _next) |
const TiXmlElement | NextSiblingElement (str) |
Convenience function to get through elements. More... | |
TiXmlElement | NextSiblingElement (str _value) |
STL std::string form. More... | |
const TiXmlElement | NextSiblingElement (str _value) |
bool | NoChildren () |
Returns true if this node has no children. More... | |
TiXmlNode | Parent () |
One step up the DOM. More... | |
const TiXmlNode | Parent () |
The first child of this node. Will be null if there are no children. More... | |
TiXmlNode | PreviousSibling () |
const TiXmlNode | PreviousSibling () |
Navigate to a sibling node. More... | |
TiXmlNode | PreviousSibling (str _prev) |
const TiXmlNode | PreviousSibling (str) |
Navigate to a sibling node. More... | |
TiXmlNode | PreviousSibling (str _value) |
STL std::string form. More... | |
const TiXmlNode | PreviousSibling (str _value) |
bool | RemoveChild (TiXmlNode removeThis) |
Delete a child of this node. More... | |
TiXmlNode | ReplaceChild (TiXmlNode replaceThis, const TiXmlNode withThis) |
Replace a child of this node. More... | |
SetValue (str _value) | |
Changes the value of the node. More... | |
SetValue (str _value) | |
STL std::string form. More... | |
TiXmlComment | ToComment () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
const TiXmlComment | ToComment () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
TiXmlDeclaration | ToDeclaration () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
const TiXmlDeclaration | ToDeclaration () |
TiXmlDocument | ToDocument () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
const TiXmlDocument | ToDocument () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
TiXmlElement | ToElement () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
const TiXmlElement | ToElement () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
TiXmlText | ToText () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
const TiXmlText | ToText () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
TiXmlUnknown | ToUnknown () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
const TiXmlUnknown | ToUnknown () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
int | Type () |
Query the type (as an enumerated value, above) of this node. More... | |
str | Value () |
The meaning of 'value' changes for the specific type of TiXmlNode. More... | |
str | ValueStr () |
Return Value() as a std::string. More... | |
str | ValueTStr () |
![]() | |
int | Column () |
Get a pointer to arbitrary user data. More... | |
GetUserData () | |
Get a pointer to arbitrary user data. More... | |
GetUserData () | |
str | Parse (str p, TiXmlParsingData data, TiXmlEncoding encoding) |
Print (FILE cfile, int depth) | |
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.) Either or both cfile and str can be null. More... | |
int | Row () |
Return the position, in the original source file, of this node or attribute. More... | |
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.
__init__ | ( | const | TiXmlElement | ) |
__init__ | ( | str | in_value | ) |
Construct an element.
__init__ | ( | str | _value | ) |
std::string constructor.
str Attribute | ( | str | name | ) |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists.
str Attribute | ( | str | name | ) |
TiXmlAttribute FirstAttribute | ( | ) |
Access the first attribute in this element.
const TiXmlAttribute FirstAttribute | ( | ) |
Access the last attribute in this element.
str GetText | ( | ) |
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:
<foo>This is text</foo> const char* str = fooElement->GetText();
'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:
<foo><b>This is text</b></foo>
then the value of str would be null. The first child node isn't a text node, it is another element. From this XML:
<foo>This is <b>text</b></foo>
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.
TiXmlAttribute LastAttribute | ( | ) |
Access the last attribute in this element.
const TiXmlAttribute LastAttribute | ( | ) |
TiXmlElement operator= | ( | const TiXmlElement | base | ) |
RemoveAttribute | ( | str | name | ) |
Deletes an attribute with the given name.
STL std::string form.
RemoveAttribute | ( | str | name | ) |
Access the first attribute in this element.
SetAttribute | ( | str | name, |
str | _value | ||
) |
Sets an attribute of name to a given value.
The attribute will be created if it does not exist, or changed if it does.
SetAttribute | ( | str | name, |
int | value | ||
) |
Sets an attribute of name to a given value.
The attribute will be created if it does not exist, or changed if it does.STL std::string form.
SetAttribute | ( | str | name, |
int | _value | ||
) |
SetAttribute | ( | str | name, |
str | _value | ||
) |
STL std::string form.
SetDoubleAttribute | ( | str | name, |
double | value | ||
) |
Sets an attribute of name to a given value.
The attribute will be created if it does not exist, or changed if it does.STL std::string form.
SetDoubleAttribute | ( | str | name, |
double | value | ||
) |