StructuredDocumentTagRangeEnd class
StructuredDocumentTagRangeEnd class
Represents an end of ranged structured document tag which accepts multi-sections content. See also StructuredDocumentTagRangeStart node. To learn more, visit the Structured Document Tags or Content Control documentation article.
Remarks
Can be immediate child of Body node only.
Inheritance: StructuredDocumentTagRangeEnd → Node
Constructors
Name | Description |
---|---|
StructuredDocumentTagRangeEnd(doc, id) | Initializes a new instance of the Structured document tag range end class. |
Properties
Name | Description |
---|---|
custom_node_id | Specifies custom node identifier. (Inherited from Node) |
document | Gets the document to which this node belongs. (Inherited from Node) |
id | Specifies a unique read-only persistent numerical Id for this StructuredDocumentTagRange node. Corresponding StructuredDocumentTagRangeStart node has the same StructuredDocumentTagRangeStart.id. |
is_composite | Returns True if this node can contain other nodes.(Inherited from Node) |
next_sibling | Gets the node immediately following this node. (Inherited from Node) |
node_type | Returns NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END. |
parent_node | Gets the immediate parent of this node. (Inherited from Node) |
previous_sibling | Gets the node immediately preceding this node. (Inherited from Node) |
range | Returns a Range object that represents the portion of a document that is contained in this node. (Inherited from Node) |
Methods
Name | Description |
---|---|
accept(visitor) | Accepts a visitor. |
clone(is_clone_children) | Creates a duplicate of the node. (Inherited from Node) |
get_ancestor(ancestor_type) | Gets the first ancestor of the specified object type. (Inherited from Node) |
get_ancestor(ancestor_type) | Gets the first ancestor of the specified NodeType. (Inherited from Node) |
get_text() | Gets the text of this node and of all its children. (Inherited from Node) |
next_pre_order(root_node) | Gets next node according to the pre-order tree traversal algorithm. (Inherited from Node) |
node_type_to_string(node_type) | A utility method that converts a node type enum value into a user friendly string. (Inherited from Node) |
previous_pre_order(root_node) | Gets the previous node according to the pre-order tree traversal algorithm. (Inherited from Node) |
remove() | Removes itself from the parent. (Inherited from Node) |
to_string(save_format) | Exports the content of the node into a string in the specified format. (Inherited from Node) |
to_string(save_options) | Exports the content of the node into a string using the specified save options. (Inherited from Node) |
Examples
Shows how to get the properties of multi-section structured document tags.
doc = aw.Document(file_name=MY_DIR + 'Multi-section structured document tags.docx')
range_start_tag = doc.get_child_nodes(aw.NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_START, True)[0].as_structured_document_tag_range_start()
range_end_tag = doc.get_child_nodes(aw.NodeType.STRUCTURED_DOCUMENT_TAG_RANGE_END, True)[0].as_structured_document_tag_range_end()
print('StructuredDocumentTagRangeStart values:')
print(f'\t|Id: {range_start_tag.id}')
print(f'\t|Title: {range_start_tag.title}')
print(f'\t|PlaceholderName: {range_start_tag.placeholder_name}')
print(f'\t|IsShowingPlaceholderText: {range_start_tag.is_showing_placeholder_text}')
print(f'\t|LockContentControl: {range_start_tag.lock_content_control}')
print(f'\t|LockContents: {range_start_tag.lock_contents}')
print(f'\t|Level: {range_start_tag.level}')
print(f'\t|NodeType: {range_start_tag.node_type}')
print(f'\t|RangeEnd: {range_start_tag.range_end}')
print(f'\t|Color: {range_start_tag.color.to_argb()}')
print(f'\t|SdtType: {range_start_tag.sdt_type}')
print(f'\t|FlatOpcContent: {range_start_tag.word_open_xml}')
print(f'\t|Tag: {range_start_tag.tag}\n')
print('StructuredDocumentTagRangeEnd values:')
print(f'\t|Id: {range_end_tag.id}')
print(f'\t|NodeType: {range_end_tag.node_type}')
See Also
- module aspose.words.markup
- class Node