Body
Overview
Body is a class in Aspose.Words FOSS for Python.
Inherits from: BaseModel, NodeCastMixin.
The Body class aggregates paragraphs and tables and lets you retrieve child nodes of a specific type with get_child_nodes(node_type, deep).
This class provides 9 methods for working with Body objects in Python programs.
Available methods include: as_body, as_cell, as_paragraph, as_row, as_run, as_section, as_shape, as_table, get_child_nodes.
All public members are accessible to any Python application after installing the Aspose.Words FOSS for Python package.
Properties: children, paragraphs, tables, type.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
paragraphs | list[Paragraph] | Read | Direct Paragraph children. |
tables | list[Table] | Read | Direct Table children. |
type | str | Read | Gets the type. |
children | list[BodyChild] | Read | Gets the children. |
Methods
| Signature | Description |
|---|---|
get_child_nodes(node_type: int, deep: bool) → list | Child nodes, optionally filtered by :class:NodeType. |
as_body() | Calls as_body on this Body instance. |
as_cell() | Calls as_cell on this Body instance. |
as_paragraph() | Calls as_paragraph on this Body instance. |
as_row() | Calls as_row on this Body instance. |
as_run() | Calls as_run on this Body instance. |
as_section() | Calls as_section on this Body instance. |
as_shape() | Calls as_shape on this Body instance. |
as_table() | Calls as_table on this Body instance. |