Internal
The components written in this one's place, one after another, when it can't be written as a single element, such as a run with another run in its children. Undefined when it is written as itself.
Adds a child element to this component.
The child component or text string to add
This component (for chaining)
Adds new section properties to the document body.
Creates a new section by moving the previous section's properties into a paragraph at the end of that section, and then adding the new section as the current section.
According to the OOXML specification:
Section properties configuration (page size, margins, headers, footers, etc.)
Finds the section properties that govern a top-level child of the body.
A section's properties are stored after its content (either in the closing paragraph of the section or, for the last section, at the end of the body), so the governing section is the first one found at or after the child. When no child is given (or it is not a direct child of the body), the first section is returned.
Optionalchild: XmlComponent
A direct child of the body (paragraph, table, etc.)
The governing section properties, or undefined if the body has no sections
Prepares the body element for XML serialization.
Ensures that the last section's properties are placed as a direct child of the body element, as required by the OOXML specification. Once the body is written, its tables of contents are filled in from its headings, and, when the body has a page number estimator, its page references are given their page numbers. Its SEQ fields are given their numbers after the tables of contents are filled in, as Word leaves a heading's SEQ number out of its entry.
The XML serialization context
The prepared XML object or undefined
Adds a block-level component to the body.
This method is used internally by the Document class to add paragraphs, tables, and other block-level elements to the document body.
The XML component to add (paragraph, table, etc.)
Represents the document body in a WordprocessingML document.
The body element is the container for all block-level content in the document. This includes paragraphs, tables, and section properties that define page layout.
The body supports multiple sections, where each section (except the last one) must have its section properties stored in a paragraph's properties at the end of that section. The last section's properties are stored as a direct child of the body element.
Reference: http://officeopenxml.com/WPdocument.php
XSD Schema
Example