Basic Document Structure

The main document story of the simplest WordprocessingML document consists of the following XML elements:

  • <document> — The root element for a WordprocessingML's main document part, which defines the main document story.

  • <body> — The container for the collection of block-level structures that comprise the main story.

  • <p> — A paragraph.

  • <r> — A run.

  • <t> — A range of text.

A run is a region of text in a story with a common set of properties. The text in a WordprocessingML document must be contained within one or more runs. A paragraph is a collection of one or more runs that is displayed as a unit. A run must be contained within a paragraph.

Consider the following Main Document XML for a simple WordprocessingML document:

<?xml version="1.0"?>
<w:document xmlns:w="…">
  <w:body>
    <w:p>
      <w:r>
        <w:t>Hello, world.</w:t>
      </w:r>
    </w:p>
  </w:body>
</w:document>