class documentation

class Node: (source)

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

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method append​Child Make the given Node the last child of this node.
Method clone​Node Undocumented
Method first​Child Undocumented
Method has​Child​Nodes Undocumented
Method insert​Before Make the given Node new a child of this node which comes before the Node ref.
Method is​Equal​To​Node 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 last​Child Undocumented
Method remove​Child Remove the given Node from this node's children.
Method replace​Child 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 node​Name Undocumented
Instance Variable child​Nodes Undocumented
Instance Variable parent​Node Undocumented
def appendChild(self, child): (source)
Make the given Node the last child of this node.
Parameters
childThe Node which will become a child of this node.
Raises
TypeErrorIf child is not a Node instance.
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
newA Node which will become a child of this node.
refA Node which is already a child of this node which new will be inserted before.
Returns
new
Raises
TypeErrorIf new or ref is not a Node instance.
def isEqualToNode(self, other): (source)
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:NodeUndocumented
Returns
boolUndocumented
def lastChild(self): (source)

Undocumented

def removeChild(self, child): (source)
Remove the given Node from this node's children.
Parameters
childA 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
TypeErrorIf 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
new​ChildA Node which will be made a child of this node.
old​ChildA Node which is a child of this node which will give up its position to newChild.
Raises
TypeErrorIf newChild or oldChild is not a Node instance.
ValueErrorIf 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)
nodeName: str = (source)

Undocumented

childNodes: list = (source)

Undocumented

parentNode = (source)

Undocumented