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

ImageRenderOptionsImageRenderOptionsImageRenderOptionsImageRenderOptions
ParentNode`NodeNone`ImageRenderOptions
Document`DocumentNone`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 安全性

ParentNodeNone ルートのみ Document. DocumentNone ノードが作成されたが、まだドキュメントツリーに接続されていない場合のみです。.


関連項目

 日本語