CompositeNode

Overview

CompositeNode is a class in Aspose.Note FOSS for Python. Inherits from: Node.

CompositeNode.AppendChildLast appends the given node as the last child and returns the added node.

This class provides 7 methods for working with CompositeNode objects in Python programs. Available methods include: Accept, AppendChildFirst, AppendChildLast, GetChildNodes, GetEnumerator, InsertChild, RemoveChild. All public members are accessible to any Python application after installing the Aspose.Note FOSS for Python package. Properties: Document, FirstChild, LastChild, ParentNode.

Properties

NameTypeAccessDescription
FirstChildNode | NoneReadGets the first child.
LastChildNode | NoneReadGets the last child.
ParentNodeNode | NoneReadGets the parent node.
DocumentDocument | NoneReadGets the document.

Methods

SignatureDescription
AppendChildLast(node: TNode)TNodeAdds the given node as the last child of this composite and returns the node
AppendChildFirst(node: TNode)TNodeInserts the given node as the first child and returns the added node
InsertChild(index: int, node: TNode)TNodeInserts the given node at the specified index among children and returns the added node
RemoveChild(node: Node)Removes the specified child node from this composite node
GetEnumerator()Iterator[Node]Returns an iterator over the child nodes of this composite node
GetChildNodes(node_type: type[TNode])list[TNode]Returns a list of child nodes that match the provided node type
Accept(visitor: DocumentVisitor)

See Also