Trees | Indices | Help |
|
---|
|
An XML element object.
|
|||
|
|||
|
|||
Element |
|
||
basestring |
|
||
Element |
|
||
Element |
|
||
Element |
|
||
|
|||
Element |
|
||
basestring |
|
||
Element |
|
||
Text |
|
||
Element |
|
||
boolean |
|
||
(prefix, name) |
|
||
(prefix, name) |
|
||
Element |
|
||
Element |
|
||
Element|None |
|
||
|
|||
Attribute |
|
||
Element |
|
||
Element |
|
||
[Element,...] |
|
||
[Element,...] |
|
||
[Element,...] |
|
||
(prefix,URI) |
|
||
Element |
|
||
Element |
|
||
Element |
|
||
basestring |
|
||
[basestring,...] |
|
||
Element |
|
||
Element |
|
||
Element |
|
||
boolean |
|
||
boolean |
|
||
Element |
|
||
|
|||
basestring |
|
||
basestring |
|
||
basestring |
|
||
boolean |
|
||
[Element,..] |
|
||
[Element,..] |
|
||
Element |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
Element |
|
|
|||
matcher = {'eq': lambda a, b: a== b, 'startswith': lambda a, b A collection of lambda for string matching. |
|||
specialprefixes =
A dictionary of builtin-special prefixes. |
|
|||
[Attribute,] |
attributes A list of XML attributes. |
||
[Element,] |
children A list of child elements. |
||
(prefix, name) |
expns An explicit namespace (xmlns="..."). |
||
basestring |
name The unqualified name of the attribute |
||
dict |
nsprefixes A mapping of prefixes to namespaces. |
||
Element |
parent The node containing this attribute |
||
basestring |
prefix The optional namespace prefix. |
||
basestring |
text The element's text content. |
|
Build the specifed pat as a/b/c where missing intermediate nodes are built automatically.
|
|
Rename the element.
|
Set the element namespace prefix.
|
Get the fully qualified name of this element
|
Get the root (top) node of the tree.
|
Deep clone of this element and children.
|
Detach from parent.
|
Set an attribute's value.
See Also: __setitem__() |
Unset (remove) an attribute.
|
Get the value of an attribute by name.
See Also: __getitem__() |
Set the element's Text content.
|
Get the element's Text content with optional default
|
Trim leading and trailing whitespace.
|
Get whether the element has text and that it is not an empty (zero length) string.
|
Get the element's namespace.
|
Get the default (unqualified namespace). This is the expns of the first node (looking up the tree) that has it set.
|
Append the specified child based on whether it is an element or an attrbuite. |
Insert an Element content at the specified index. |
Remove the specified child element or attribute. |
Replace child with the specified content. |
Get an attribute by name and (optional) namespace |
Get a child by (optional) name and/or (optional) namespace. |
Get a child at path where path is a (/) separated list of element names that are expected to be children.
|
Get a list of children at path where path is a (/) separated list of element names that are expected to be children.
|
Get a list of children by (optional) name and/or (optional) namespace.
|
Detach and return this element's children.
|
Resolve the specified prefix to a namespace. The nsprefixes is searched. If not found, it walks up the tree until either resolved or the top of the tree is reached. Searching up the tree provides for inherited mappings.
|
Add or update a prefix mapping.
|
Update (redefine) a prefix mapping for the branch.
Note: This method traverses down the entire branch! |
Clear the specified prefix from the prefix mappings.
|
Find the first prefix that has been mapped to a namespace URI. The local mapping is searched, then it walks up the tree until it reaches the top or finds a match.
|
Find all prefixes that has been mapped to a namespace URI. The local mapping is searched, then it walks up the tree until it reaches the top collecting all matches.
|
Push prefix declarations up the tree as far as possible. Prefix mapping are pushed to its parent unless the parent has the prefix mapped to another URI or the parent has the prefix. This is propagated up the tree until the top is reached.
|
Refit namespace qualification by replacing prefixes with explicit namespaces. Also purges prefix mapping table.
|
Normalize the namespace prefixes. This generates unique prefixes for all namespaces. Then retrofits all prefixes and prefix mappings. Further, it will retrofix attribute values that have values containing (:).
|
Get whether the element has no children.
|
Get whether the element is nil as defined by having an attribute in the xsi:nil="true"
|
Set this node to nil as defined by having an attribute xsi:nil=flag.
|
Apply the namespace to this node. If the prefix is None then this element's explicit namespace expns is set to the URI defined by ns. Otherwise, the ns is simply mapped.
|
Get a string representation of this XML fragment.
|
Get a string representation of this XML fragment.
|
Get a string representation for all namespace declarations as xmlns="" and xmlns:p="".
|
Match by (optional) name and/or (optional) namespace.
|
Get a flattened representation of the branch.
|
Get a list of ancestors.
|
Walk the branch and call the visitor function on each node.
|
|
matcherA collection of lambda for string matching.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 20 03:54:28 2014 | http://epydoc.sourceforge.net |