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: 확장
Node자식 관리와 함께 - DocumentVisitor: 방문자 패턴 순회
- ImageRenderOptions: 루트 문서 클래스
- 개발자 가이드