Exporting the Mapped XML in the Document to an XML Data File
With the document mapped to our XML schema, let's save this document to XML conforming to the book order schema we have used. First, make sure you save your document as a .doc file so that you do not lose your work. After you have saved the document, from the File menu choose the Save As command. From the Save as type drop-down list, choose XML Document. Two check boxes appear in the dialog: Apply transform and Save data only. Make sure the Save data only check box is checked, as shown in Listing 22-1.
Figure 22-23. Saving as an XML document with Save data only checked.

Listing 22-4. A Snippet of WordML Representing the Customer Name Label and XML Mapped CustomerName
You can also use a transform when saving by checking the Apply transform box. A transform is an XSLT file that acts on the WordML XML file and transforms it to some other XML format. For example, you could create an XSLT transform that takes a WordML XML file and transforms it to XML conforming to the book order schema. This does not seem necessary because clicking the Save data only option already does this. There are compelling scenarios around a similar scenario: importing XML data and applying a transform to convert it to a nicely formatted document in WordML. The next section examines this scenario in more detail.
<w:p>
<w:r>
<w:t>Customer Name: </w:t>
</w:r>
<w:r>
<w:tab wx:wTab="555" wx:tlc="none" wx:cTlc="8"/>
</w:r>
<ns0:CustomerName>
<w:r>
<w:t>John Doe</w:t>
</w:r>
</ns0:CustomerName>
</w:p>