Node

Overview

Node is a class in Aspose.Note FOSS for Python.

Node.Accept invokes the visitor on this node for traversal or processing.

This class provides 1 method for working with Node objects in Python programs. Available methods include: Accept. All public members are accessible to any Python application after installing the Aspose.Note FOSS for Python package. Properties: Document, ParentNode.

Properties

NameTypeAccessDescription
ParentNodeNode | NoneReadGets the parent node.
DocumentDocument | NoneReadGets the document.

Methods

SignatureDescription
Accept(visitor: DocumentVisitor)Invokes the visitor on this node for traversal or processing

Examples

node.Accept(visitor: DocumentVisitor) -> None
from aspose.note import Document, RichText

doc = Document("MyNotes.one")
for rt in doc.GetChildNodes(RichText):
    # Every RichText is a Node — access parent and document via Node properties
    print(f"Document : {rt.Document is doc}")
    if rt.ParentNode is not None:
        print(f"Parent   : {type(rt.ParentNode).__name__}")
    print()

See Also

 English