Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`web`.`microdom`.`Node``

class documentation

`class Node: (source)`

Known subclasses: `twisted.web.microdom.CharacterData`, `twisted.web.microdom.Document`, `twisted.web.microdom.Element`, `twisted.web.microdom.EntityReference`

Constructor: `Node(parentNode)`

View In Hierarchy

Undocumented

Method | `__init__` | Undocumented
Method | `appendChild` | Make the given `Node` the last child of this node.
Method | `cloneNode` | Undocumented
Method | `firstChild` | Undocumented
Method | `hasChildNodes` | Undocumented
Method | `insertBefore` | Make the given `Node` `new` a child of this node which comes before the `Node` `ref`.
Method | `isEqualToNode` | Compare this node to `other`. If the nodes have the same number of children and corresponding children are equal to each other, return `True`, otherwise return `False`.
Method | `lastChild` | Undocumented
Method | `removeChild` | Remove the given `Node` from this node's children.
Method | `replaceChild` | Replace a `Node` which is already a child of this node with a different node.
Method | `toprettyxml` | Undocumented
Method | `toxml` | Undocumented
Method | `writeprettyxml` | Undocumented
Method | `writexml` | Undocumented
Class Variable | `nodeName` | Undocumented
Instance Variable | `childNodes` | Undocumented
Instance Variable | `parentNode` | Undocumented

def __init__(self, parentNode=None): (source)
overridden in `twisted.web.microdom.CharacterData`, `twisted.web.microdom.Document`, `twisted.web.microdom.Element`, `twisted.web.microdom.EntityReference`

Undocumented

def appendChild(self, child): (source)
overridden in `twisted.web.microdom.Document`

Make the given `Node` the last child of this node.

Parameters
child | The `Node` which will become a child of this node.
Raises
`TypeError` | If `child` is not a `Node` instance.

def cloneNode(self, deep=0, parent=None): (source)
overridden in `twisted.web.microdom.CDATASection`, `twisted.web.microdom.Comment`, `twisted.web.microdom.Document`, `twisted.web.microdom.Element`, `twisted.web.microdom.EntityReference`, `twisted.web.microdom.Text`

Undocumented

def firstChild(self): (source)

Undocumented

def hasChildNodes(self): (source)

Undocumented

def insertBefore(self, new, ref): (source)

Make the given `Node` `new` a child of this node which comes before the `Node` `ref`.

Parameters
new | A `Node` which will become a child of this node.
ref | A `Node` which is already a child of this node which `new` will be inserted before.
Returns
`new`
Raises
`TypeError` | If `new` or `ref` is not a `Node` instance.

def isEqualToNode(self, other): (source)
overridden in `twisted.web.microdom.Element`, `twisted.web.microdom.Text`

Compare this node to `other`. If the nodes have the same number of children and corresponding children are equal to each other, return `True`, otherwise return `False`.

Parameters
other:`Node` | Undocumented
Returns
`bool` | Undocumented

def lastChild(self): (source)

Undocumented

def removeChild(self, child): (source)

Remove the given `Node` from this node's children.

Parameters
child | A `Node` which is a child of this node which will no longer be a child of this node after this method is called.
Returns
`child`
Raises
`TypeError` | If `child` is not a `Node` instance.

def replaceChild(self, newChild, oldChild): (source)

Replace a `Node` which is already a child of this node with a different node.

Parameters
newChild | A `Node` which will be made a child of this node.
oldChild | A `Node` which is a child of this node which will give up its position to `newChild`.
Raises
`TypeError` | If `newChild` or `oldChild` is not a `Node` instance.
`ValueError` | If `oldChild` is not a child of this `Node`.

def toprettyxml(self, indent='', addindent=' ', newl='\n', strip=0): (source)

Undocumented

def toxml(self, indent='', addindent='', newl='', strip=0, nsprefixes={}, namespace=''): (source)

Undocumented

def writeprettyxml(self, stream, indent='', addindent=' ', newl='\n', strip=0): (source)

Undocumented

def writexml(self, stream, indent='', addindent='', newl='', strip=0, nsprefixes={}, namespace=''): (source)
overridden in `twisted.web.microdom.CDATASection`, `twisted.web.microdom.Comment`, `twisted.web.microdom.Document`, `twisted.web.microdom.Element`, `twisted.web.microdom.EntityReference`, `twisted.web.microdom.Text`

Undocumented

nodeName: `str` = (source)
overridden in `twisted.web.microdom.Element`

Undocumented

childNodes: `list` = (source)

Undocumented

parentNode = (source)

Undocumented