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
| Name | Type | Access | Description |
|---|---|---|---|
ParentNode | Node | None | Read | Gets the parent node. |
Document | Document | None | Read | Gets the document. |
Methods
| Signature | Description |
|---|---|
Accept(visitor: DocumentVisitor) | Invokes the visitor on this node for traversal or processing |
Examples
node.Accept(visitor: DocumentVisitor) -> Nonefrom 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()