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(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|placeholder_name: {range_start_tag.placeholder_name}")
print(f"\t|is_showing_placeholder_text: {range_start_tag.is_showing_placeholder_text}")
print(f"\t|lock_content_control: {range_start_tag.lock_content_control}")
print(f"\t|lock_contents: {range_start_tag.lock_contents}")
print(f"\t|level: {range_start_tag.level}")
print(f"\t|node_type: {range_start_tag.node_type}")
print(f"\t|range_end: {range_start_tag.range_end}")
print(f"\t|color: {range_start_tag.color.to_argb()}")
print(f"\t|sdt_type: {range_start_tag.sdt_type}")
print(f"\t|flat_opc_content: {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|node_type: {range_end_tag.node_type}")
See Also
- module aspose.words.markup
- class Node