Working With Nodes in Python
Contents
[
Hide
]
Aspose.Words - Working With Nodes
To get Node Type using Aspose.Words Java Apis in Python, simply invoke getNodeType method.
Python Code
Document = jpype.JClass("com.aspose.words.Document")
Paragraph = jpype.JClass("com.aspose.words.Paragraph")
Node = jpype.JClass("com.aspose.words.Node")
\# Create a new document.
doc = Document()
\# Creates and adds a paragraph node to the document.
para = Paragraph(doc)
\# Typed access to the last section of the document.
section = doc.getLastSection()
section.getBody().appendChild(para)
Download Running Code
Download Working With Nodes (Aspose.Words) from any of the below mentioned social coding sites: