get_by_id method
get_by_id(id)
Returns the structured document tag by identifier.
def get_by_id(self, id: int):
...
Parameter | Type | Description |
---|---|---|
id | int | The structured document tag identifier. |
Remarks
Returns null if the structured document tag with the specified identifier cannot be found.
Examples
Shows how to get structured document tag.
doc = aw.Document(file_name=MY_DIR + 'Structured document tags by id.docx')
# Get the structured document tag by Id.
sdt = doc.range.structured_document_tags.get_by_id(1160505028)
print(sdt.is_multi_section)
print(sdt.title)
# Get the structured document tag or ranged tag by Title.
sdt = doc.range.structured_document_tags.get_by_title('Alias4')
print(sdt.id)
See Also
- module aspose.words.markup
- class StructuredDocumentTagCollection