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.)
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.
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