Node — Aspose.Note FOSS for Python API Reference

Sınıf: Node

Enumerations: aspose.note Enumerations: from aspose.note import Node

Node OneNote belge nesne modelindeki her öğe için soyut temel sınıftır. Tüm somut düğüm tipleri (Document, Page, Outline, OutlineElement, RichText, Image, AttachedFile, vb.) miras alır Node. Asla örnek oluşturmazsınız Node doğrudan.


Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
ParentNode`NodeNone`Enumerations
Document`DocumentNone`Enumerations

Enumerations

Accept(visitor)

node.Accept(visitor: DocumentVisitor) -> None

Uygun olanı gönderir VisitXxxStart / VisitXxxEnd bu düğüm türü için ziyaretçi üzerindeki yöntemler. Double-dispatch’i uygulamak için alt sınıflarda geçersiz kılın.


Kullanım Örneği

Herhangi bir düğümün ağaç içindeki konumunu inceleyin

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-Güvenliği

ParentNode dır None yalnızca kök için Document. Document dır None yalnızca bir düğüm oluşturulduğunda ancak henüz bir belge ağacına eklenmediğinde.


Ayrıca Bakınız

 Türkçe