panda3d.core.TiXmlAttribute

from panda3d.core import TiXmlAttribute
class TiXmlAttribute

Bases: TiXmlBase

An attribute is a name-value pair. Elements have an arbitrary number of attributes, each with a unique name.

Note

The attributes are not TiXmlNodes, since they are not part of the tinyXML document object model. There are other suggested ways to look at this problem.

Inheritance diagram

Inheritance diagram of TiXmlAttribute

__init__() → None

/// Construct an empty attribute.

__init__(_name: str, _value: str) → None

/// Construct an attribute with a name and value.

__init__(_name: str, _value: str) → None

/// std::string constructor.

Name() → str

///< Return the name of this attribute.

Value() → str

///< Return the value of this attribute.

ValueStr() → str

///< Return the value of this attribute.

IntValue() → int

///< Return the value of this attribute, converted to an integer.

DoubleValue() → float

///< Return the value of this attribute, converted to a double.

NameTStr() → str

Get the tinyxml string representation

SetName(_name: str) → None

///< Set the name of this attribute.

SetName(_name: str) → None

/// STL std::string form.

SetValue(_value: str) → None

///< Set the value.

SetValue(_value: str) → None

/// STL std::string form.

SetIntValue(_value: int) → None

///< Set the value from an integer.

SetDoubleValue(_value: float) → None

///< Set the value from a double.

Next() → TiXmlAttribute
Return type

TiXmlAttribute

Next() → TiXmlAttribute

/// Get the next sibling attribute in the DOM. Returns null at end.

Return type

TiXmlAttribute

Previous() → TiXmlAttribute
Return type

TiXmlAttribute

Previous() → TiXmlAttribute

/// Get the previous sibling attribute in the DOM. Returns null at beginning.

Return type

TiXmlAttribute

SetDocument(doc: TiXmlDocument) → None

[internal use] Set the document pointer so the attribute can report errors.