A library for performing interesting tasks with DOM objects.
This module is now deprecated.
Class |
|
This is an evil and horrible speed hack. Basically, if you have a big chunk of XML that you want to insert into the DOM, but you don't want to incur the cost of parsing it, you can construct one of these and insert it into the DOM... |
Exception |
|
Undocumented |
Function | clear |
Remove all children from the given node. |
Function | find |
Return an iterable of the elements which are children of parent for which the predicate matcher returns true. |
Function | find |
Undocumented |
Function | find |
Return an iterable of the elements which are direct children of parent and which have the attribute attribute. |
Function | find |
Undocumented |
Function | find |
Undocumented |
Function | find |
Undocumented |
Function | find |
Undocumented |
Function | gather |
Visit each child node and collect its text data, if any, into a string. For example: |
Function | get |
Get a node with the specified nodeId as any of the class, id or pattern attributes. If there is no such node, raise NodeLookupError . |
Function | get |
Get a node with the specified nodeId as any of the class, id or pattern attributes. If there is no such node, raise NodeLookupError . Remove all child nodes before returning. |
Function | get |
Get a node with the specified nodeId as any of the class, id or pattern attributes. If there is no such node, return None . |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | locate |
Find subnodes in the given node where the given attribute has the given value. |
Function | named |
namedChildren(parent, nodeName) -> children (not descendants) of parent that have tagName == nodeName |
Function | substitute |
Look through the given node's children for strings, and attempt to do string substitution with the given parameter. |
Function | super |
Undocumented |
Function | super |
Undocumented |
Function | super |
Undocumented |
Function | write |
Undocumented |
Variable | warning |
Undocumented |
Function | _get |
(internal) Get a node with the specified nodeId as any of the class, id or pattern attributes. |
Return an iterable of the elements which are children of parent for which the predicate matcher returns true.
Return an iterable of the elements which are direct children of parent and which have the attribute attribute.
Visit each child node and collect its text data, if any, into a string. For example:
>>> doc=microdom.parseString('<a>1<b>2<c>3</c>4</b></a>') >>> gatherTextNodes(doc.documentElement) '1234'
With dounescape=1, also convert entities back into normal characters.
Returns | |
str | the gathered nodes as a single string |
Get a node with the specified nodeId as any of the class, id or pattern attributes. If there is no such node, raise NodeLookupError
.
Get a node with the specified nodeId as any of the class, id or pattern attributes. If there is no such node, raise NodeLookupError
. Remove all child nodes before returning.
Get a node with the specified nodeId as any of the class, id or pattern attributes. If there is no such node, return None
.
namedChildren(parent, nodeName) -> children (not descendants) of parent that have tagName == nodeName