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`.`words`.`xish`.`domish``

module documentation
(source)

DOM-like XML processing support.

This module provides support for parsing XML into DOM-like object structures and serializing such structures to an XML string representation, optimized for use in streaming XML applications.

Interface | `IElement` | Interface to XML element nodes.
Class | `Element` | Represents an XML element node.
Class | `ExpatElementStream` | Undocumented
Class | `Namespace` | Convenience object for tracking namespace declarations.
Class | `SerializedXML` | Marker class for pre-serialized XML in the DOM.
Class | `SuxElementStream` | Undocumented
Exception | `ParserError` | Exception thrown when a parsing error occurs
Function | `elementStream` | Preferred method to construct an ElementStream
Function | `escapeToXml` | Escape text to proper XML form, per section 2.3 in the XML specification.
Function | `generateElementsNamed` | Filters Element items in a list with matching name, regardless of URI.
Function | `generateElementsQNamed` | Filters Element items in a list with matching name and URI.
Function | `generateOnlyInterface` | Filters items in a list by class
Function | `unescapeFromXml` | Undocumented
Constant | `G_PREFIXES` | Undocumented
Class | `_ListSerializer` | Internal class which serializes an Element tree into a buffer
Function | `_splitPrefix` | Internal method for splitting a prefixed Element name into its respective parts

def elementStream(): (source)

Preferred method to construct an ElementStream

Uses Expat-based stream if available, and falls back to Sux if necessary.

def escapeToXml(text, isattrib=0): (source)

Escape text to proper XML form, per section 2.3 in the XML specification.

Parameters
text:`str` | Text to escape
isattrib:`bool` | Triggers escaping of characters necessary for use as attribute values

def generateElementsNamed(list, name): (source)

Filters Element items in a list with matching name, regardless of URI.

def generateElementsQNamed(list, name, uri): (source)

Filters Element items in a list with matching name and URI.

def generateOnlyInterface(list, int): (source)

Filters items in a list by class

def unescapeFromXml(text): (source)

Undocumented

G_PREFIXES: `dict[str, str]` = (source)

Undocumented

Value

    {'http://www.w3.org/XML/1998/namespace': 'xml'}

def _splitPrefix(name): (source)

Internal method for splitting a prefixed Element name into its respective parts