| |
- __builtin__.object
-
- XmlAttribute
- XmlElement
class XmlAttribute(__builtin__.object) |
| |
Methods defined here:
- __init__(self, qname, value)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class XmlElement(__builtin__.object) |
|
Represents an element node in an XML document.
The text member is a UTF-8 encoded str or unicode. |
|
Methods defined here:
- FindChildren = get_elements(self, tag=None, namespace=None, version=1)
- FindExtensions = get_elements(self, tag=None, namespace=None, version=1)
- GetAttributes = get_attributes(self, tag=None, namespace=None, version=1)
- GetElements = get_elements(self, tag=None, namespace=None, version=1)
- ToString = to_string(self, version=1, encoding=None, pretty_print=None)
- __init__(self, text=None, *args, **kwargs)
- __str__(self)
- get_attributes(self, tag=None, namespace=None, version=1)
- Find all attributes which match the tag and namespace.
To find all attributes in this object, call get_attributes with the tag
and namespace both set to None (the default). This method searches
through the object's members and the attributes stored in
_other_attributes which did not fit any of the XML parsing rules for this
class.
Args:
tag: str
namespace: str
version: int Specifies the version of the XML rules to be used when
searching for matching attributes.
Returns:
A list of XmlAttribute objects for the matching attributes.
- get_elements(self, tag=None, namespace=None, version=1)
- Find all sub elements which match the tag and namespace.
To find all elements in this object, call get_elements with the tag and
namespace both set to None (the default). This method searches through
the object's members and the elements stored in _other_elements which
did not match any of the XML parsing rules for this class.
Args:
tag: str
namespace: str
version: int Specifies the version of the XML rules to be used when
searching for matching elements.
Returns:
A list of the matching XmlElements.
- to_string(self, version=1, encoding=None, pretty_print=None)
- Converts this object to XML.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- attributes
- children
- extension_attributes
- extension_elements
- namespace
- tag
Data and other attributes defined here:
- text = None
| |