Part of twisted.words.xish.domish View Source View In Hierarchy
Known implementations: twisted.words.xish.domish.Element
See Element for
a detailed example of its general use.
Warning: this Interface is not yet complete!
| Attribute | uri | Element's namespace URI |
| Attribute | name | Element's local name |
| Attribute | defaultUri | Default namespace URI of child elements |
| Attribute | attributes | Dictionary of element attributes |
| Attribute | children | List of child nodes |
| Attribute | parent | Reference to element's parent element |
| Attribute | localPrefixes | Dictionary of local prefixes |
| Method | toXml | Serializes object to a (partial) XML document |
| Method | addElement | Create an element and add as child. |
| Method | addChild | Adds a node as child of this element. |
| Parameters | prefixes | dictionary that maps namespace URIs to suggested prefix names. (type: dict) |
| closeElement | flag that determines whether to include the closing tag of the element in
the serialized string. A value of 0 only generates the
element's start tag. A value of 1 yields a complete
serialization. (type: int) | |
| defaultUri | Initial default namespace URI. This is most useful for partial rendering,
where the logical parent element (of which the starttag was already
serialized) declares a default namespace that should be inherited. (type: str) | |
| prefixesInScope | list of prefixes that are assumed to be declared by ancestors. (type: list) | |
| Returns | (partial) serialized XML (type: unicode) | |
The new element is added to this element as a child, and will have this element as its parent.
| Parameters | name | element name. This can be either a unicode object that
contains the local name, or a tuple of (uri, local_name) for a fully
qualified name. In the former case, the namespace URI is inherited from
this element. (type: unicode or tuple of (unicode,
unicode)) |
| defaultUri | default namespace URI for child elements. If None, this is
inherited from this element. (type: unicode) | |
| content | text contained by the new element. (type: unicode) | |
| Returns | the created element (type: object providing IElement) | |