Node — Aspose.Note FOSS for Python API Reference
クラス: Node
ImageRenderOptions: aspose.note ImageRenderOptions: from aspose.note import Node
Node は OneNote ドキュメント オブジェクト モデルのすべての要素の抽象基底クラスです。すべての具体的なノードタイプは(Document, Page, Outline, OutlineElement, RichText, Image, AttachedFile,、など)から継承する Node. インスタンス化しません Node 直接に。.
ImageRenderOptions
| ImageRenderOptions | ImageRenderOptions | ImageRenderOptions | ImageRenderOptions |
|---|---|---|---|
ParentNode | `Node | None` | ImageRenderOptions |
Document | `Document | None` | ImageRenderOptions |
ImageRenderOptions
Accept(visitor)
node.Accept(visitor: DocumentVisitor) -> None適切なものをディスパッチします VisitXxxStart / VisitXxxEnd このノードタイプに対するビジターのメソッドを呼び出します。サブクラスでオーバーライドしてダブルディスパッチを実装します。.
使用例
ツリー内の任意のノードの位置を検査する
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()None 安全性
ParentNode は None ルートのみ Document. Document は None ノードが作成されたが、まだドキュメントツリーに接続されていない場合のみです。.
関連項目
- CompositeNode: extends
Node子要素の管理付き - DocumentVisitor: ビジターパターンのトラバーサル
- ImageRenderOptions: ルートドキュメントクラス
- 開発者ガイド