# Class Body

#### Hierarchy

- XmlComponent
  - Body

- Defined in src/file/document/body/body.ts:6

#####
Index

### Constructors

constructor

### Methods

addChildElement
addSection
prepForXml
push

## Constructors

### constructor

- new Body(): Body

- #### Returns Body

  Overrides XmlComponent.constructor

  - Defined in src/file/document/body/body.ts:10

## Methods

### addChildElement

- addChildElement(child: string | XmlComponent): XmlComponent

- #### Parameters

  - ##### child: string | XmlComponent

  #### Returns XmlComponent

  Inherited from XmlComponent.addChildElement

  - Defined in src/file/xml-components/xml-component.ts:34

### addSection

- addSection(options: ISectionPropertiesOptions): void

- Adds new section properties. Note: Previous section is created in paragraph after the current element, and then new section will be added. The spec says:

  - section element should be in the last paragraph of the section
  - last section should be direct child of body

  #### Parameters

  - ##### options: ISectionPropertiesOptions

    new section options

  #### Returns void

  - Defined in src/file/document/body/body.ts:23

### prepForXml

- prepForXml(context: IContext): undefined | IXmlableObject

- #### Parameters

  - ##### context: IContext

  #### Returns undefined | IXmlableObject

  Overrides XmlComponent.prepForXml

  - Defined in src/file/document/body/body.ts:30

### push

- push(component: XmlComponent): void

- #### Parameters

  - ##### component: XmlComponent

  #### Returns void

  - Defined in src/file/document/body/body.ts:39

Generated using TypeDoc