Home | Trees | Indices | Help |
---|
|
An XML element object.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Element |
|
||
[Element,..] |
|
||
Element |
|
||
|
|||
[Element,..] |
|
||
Element |
|
||
[Element,...] |
|
||
Element |
|
||
Element |
|
||
(prefix, name) |
|
||
Element |
|
||
[Element,...] |
|
||
basestring |
|
||
[basestring,...] |
|
||
basestring |
|
||
Attribute |
|
||
Element |
|
||
[Element,...] |
|
||
Element |
|
||
Text |
|
||
boolean |
|
||
Element |
|
||
boolean |
|
||
boolean |
|
||
boolean |
|
||
(prefix, name) |
|
||
Element |
|
||
basestring |
|
||
basestring |
|
||
Element |
|
||
|
|||
basestring |
|
||
Element |
|
||
Element|None |
|
||
|
|||
|
|||
(prefix,URI) |
|
||
|
|||
Element |
|
||
Element |
|
||
Element |
|
||
basestring |
|
||
Element |
|
||
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. |
|
|
Add or update a prefix mapping.
|
Get a list of ancestors.
|
Append the specified child based on whether it is an element or an attrbuite. |
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 flattened representation of the branch.
|
Build the specifed pat as a/b/c where missing intermediate nodes are built automatically.
|
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.
|
Clear the specified prefix from the prefix mappings.
|
Deep clone of this element and children.
|
Get the default (unqualified namespace). This is the expns of the first node (looking up the tree) that has it set.
|
Detach from parent.
|
Detach and return this element's children.
|
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.
|
Get the value of an attribute by name.
See Also: __getitem__() |
Get an attribute by name and (optional) namespace |
Get a child by (optional) name and/or (optional) namespace. |
Get a list of children by (optional) name and/or (optional) namespace.
|
Get the root (top) node of the tree.
|
Get the element's Text content with optional default
|
Get whether the element has text and that it is not an empty (zero length) string.
|
Insert an Element content at the specified index. |
Get whether the element has no children.
|
Get whether the element is nil as defined by having an attribute in the xsi:nil="true"
|
Match by (optional) name and/or (optional) namespace.
|
Get the element's namespace.
|
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 a string representation for all namespace declarations as xmlns="" and xmlns:p="".
|
Get a string representation of this XML fragment.
|
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.
|
Get the fully qualified name of this element
|
Refit namespace qualification by replacing prefixes with explicit namespaces. Also purges prefix mapping table.
|
Remove the specified child element or attribute. |
Rename the element.
|
Replace child with the specified content. |
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.
|
Set an attribute's value.
See Also: __setitem__() |
Set the element namespace prefix.
|
Set the element's Text content.
|
Set this node to nil as defined by having an attribute xsi:nil=flag.
|
Get a string representation of this XML fragment.
|
Trim leading and trailing whitespace.
|
Unset (remove) an attribute.
|
Update (redefine) a prefix mapping for the branch.
Note: This method traverses down the entire branch! |
Walk the branch and call the visitor function on each node.
|
|
matcherA collection of lambda for string matching.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Mar 21 14:39:09 2011 | http://epydoc.sourceforge.net |