class documentation

Instances are terminal nodes (leaves) containing text only; no child nodes or attributes. Initialize by passing a string to the constructor. Access the raw (null-escaped) text with ``str(<instance>)`` and unescaped text with ``<instance>.astext()``.

Method __new__ Assert that `data` is not an array of bytes and warn if the deprecated `rawsource` argument is used.
Method __repr__ Undocumented
Method astext Return a string representation of this Node.
Method copy Return a copy of self.
Method deepcopy Return a deep copy of self (also copying children).
Method lstrip Undocumented
Method pformat Return an indented pseudo-XML representation, for test purposes.
Method rstrip Undocumented
Method shortrepr Undocumented
Class Variable children Text nodes have no children, and cannot have children.
Class Variable tagname Undocumented
Method _dom_node Undocumented

Inherited from Node:

Method __bool__ Node instances are always true, even if they're empty. A node is more than a simple container. Its boolean "truth" does not depend on having one or more subnodes in the doctree.
Method asdom Return a DOM **fragment** representation of this Node.
Method document.setter Undocumented
Method findall Return an iterator yielding nodes following `self`:
Method next_node Return the first node in the iterator returned by findall(), or None if the iterable is empty.
Method previous_sibling Return preceding sibling node or ``None``.
Method setup_child Undocumented
Method traverse Return list of nodes following `self`.
Method walk Traverse a tree of `Node` objects, calling the `dispatch_visit()` method of `visitor` when entering each node. (The `walkabout()` method is similar, except it also calls the `dispatch_departure()` method before exiting each node...
Method walkabout Perform a tree traversal similarly to `Node.walk()` (which see), except also call the `dispatch_departure()` method before exiting each node.
Class Variable line The line number (1-based) of the beginning of this Node in `source`.
Class Variable parent Back-reference to the Node immediately containing this Node.
Class Variable source Path or description of the input source which generated this Node.
Property document Return the `document` root node of the tree containing this Node.
Method _fast_findall Return iterator that only supports instance checks.
Method _superfast_findall Return iterator that doesn't check for a condition.
Instance Variable _document Undocumented
def __new__(cls, data, rawsource=None): (source)

Assert that `data` is not an array of bytes and warn if the deprecated `rawsource` argument is used.

def __repr__(self): (source)

Undocumented

def astext(self): (source)

Return a string representation of this Node.

def copy(self): (source)

Return a copy of self.

def deepcopy(self): (source)

Return a deep copy of self (also copying children).

def lstrip(self, chars=None): (source)

Undocumented

def pformat(self, indent=' ', level=0): (source)

Return an indented pseudo-XML representation, for test purposes. Override in subclasses.

def rstrip(self, chars=None): (source)

Undocumented

def shortrepr(self, maxlen=18): (source)

Undocumented

children: tuple = (source)

Text nodes have no children, and cannot have children.

tagname: str = (source)

Undocumented

def _dom_node(self, domroot): (source)

Undocumented