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`.`Element``

class documentation

`class Element(Node): (source)`

View In Hierarchy

Undocumented

Method | `__init__` | Undocumented
Method | `__repr__` | Undocumented
Method | `__str__` | Undocumented
Method | `addPrefixes` | Undocumented
Method | `cloneNode` | Undocumented
Method | `endTag` | Undocumented
Method | `getAttribute` | Undocumented
Method | `getAttributeNode` | Undocumented
Method | `getAttributeNS` | Undocumented
Method | `getElementsByTagName` | Undocumented
Method | `hasAttribute` | Undocumented
Method | `hasAttributes` | Undocumented
Method | `isEqualToElement` | Undocumented
Method | `isEqualToNode` | Compare this element to `other`. If the `nodeName`, `namespace`, `attributes`, and `childNodes` are all the same, return `True`, otherwise return `False`.
Method | `removeAttribute` | Undocumented
Method | `setAttribute` | Undocumented
Method | `writexml` | Serialize this `Element` to the given stream.
Instance Variable | `attributes` | Undocumented
Instance Variable | `caseInsensitive` | Undocumented
Instance Variable | `endTagName` | Undocumented
Instance Variable | `namespace` | Undocumented
Instance Variable | `nodeName` | Undocumented
Instance Variable | `nsprefixes` | Undocumented
Instance Variable | `preserveCase` | Undocumented
Instance Variable | `tagName` | Undocumented
Instance Variable | `_filename` | Undocumented
Instance Variable | `_markpos` | Undocumented

Inherited from `Node`:

Method | `appendChild` | Make the given `Node` the last child of this node.
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 | `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
Instance Variable | `childNodes` | Undocumented
Instance Variable | `parentNode` | Undocumented

def __init__(self, tagName, attributes=None, parentNode=None, filename=None, markpos=None, caseInsensitive=1, preserveCase=0, namespace=None): (source)
overrides `twisted.web.microdom.Node.__init__`

Undocumented

def __repr__(self): (source)

Undocumented

Returns
`str` | Undocumented

def __str__(self): (source)

Undocumented

Returns
`str` | Undocumented

def addPrefixes(self, pfxs): (source)

Undocumented

def cloneNode(self, deep=0, parent=None): (source)
overrides `twisted.web.microdom.Node.cloneNode`

Undocumented

def endTag(self, endTagName): (source)

Undocumented

def getAttribute(self, name, default=None): (source)

Undocumented

def getAttributeNode(self, name): (source)

Undocumented

def getAttributeNS(self, ns, name, default=None): (source)

Undocumented

def getElementsByTagName(self, name): (source)

Undocumented

def hasAttribute(self, name): (source)

Undocumented

def hasAttributes(self): (source)

Undocumented

def isEqualToElement(self, n): (source)

Undocumented

def isEqualToNode(self, other): (source)
overrides `twisted.web.microdom.Node.isEqualToNode`

Compare this element to `other`. If the `nodeName`, `namespace`, `attributes`, and `childNodes` are all the same, return `True`, otherwise return `False`.

def removeAttribute(self, name): (source)

Undocumented

def setAttribute(self, name, attr): (source)

Undocumented

def writexml(self, stream, indent='', addindent='', newl='', strip=0, nsprefixes={}, namespace=''): (source)
overrides `twisted.web.microdom.Node.writexml`

Serialize this `Element` to the given stream.

Parameters
stream | A file-like object to which this `Element` will be written.
indent | Undocumented
addindent | Undocumented
newl | Undocumented
strip | Undocumented
nsprefixes | A `dict` mapping namespace URIs as `str` to prefixes as `str`. This defines the prefixes which are already in scope in the document at the point at which this `Element` exists. This is essentially an implementation detail for namespace support. Applications should not try to use it.
namespace | The namespace URI as a `str` which is the default at the point in the document at which this `Element` exists. This is essentially an implementation detail for namespace support. Applications should not try to use it.

attributes = (source)

Undocumented

caseInsensitive = (source)

Undocumented

endTagName = (source)

Undocumented

namespace = (source)

Undocumented

nodeName = (source)
overrides `twisted.web.microdom.Node.nodeName`

Undocumented

nsprefixes = (source)

Undocumented

preserveCase = (source)

Undocumented

tagName = (source)

Undocumented

_filename = (source)

Undocumented

_markpos = (source)

Undocumented