node_type property

SubDocument.node_type property

Returns NodeType.SUB_DOCUMENT.

@property
def node_type(self) -> aspose.words.NodeType:
    ...

Examples

Shows how to access a master document’s subdocument.

doc = aw.Document(file_name=MY_DIR + 'Master document.docx')
sub_documents = doc.get_child_nodes(aw.NodeType.SUB_DOCUMENT, True)
# This node serves as a reference to an external document, and its contents cannot be accessed.
sub_document = sub_documents[0].as_sub_document()
self.assertFalse(sub_document.is_composite)

See Also