Word provides multiple options for saving XML files so that users have the flexibility to meet their business needs. XML files can be saved using the Microsoft Word document schema, WordML, XML data only based on the schema(s) attached to the document, or data only using a transformation.
To save an XML document that preserves all the Word document properties and settings, follow these steps (see Figure 25.30):
Choose File, Save As.
In the Save As dialog box, select XML Document in the Save as Type list.
Enter a filename in the File Name text box.
Clear the Save Data Only check box if it is checked.
Click Save.
To save an XML document with only the data related to the attached schema, follow these steps (see Figure 25.31):
Choose File, Save As.
In the Save As dialog box, select XML Document in the Save as Type list.
Enter a filename in the File Name text box.
Check the Save Data Only check box if it is not checked.
Click Save.
To save an XML document using a transformation, follow these steps (see Figure 25.32):
Choose File, Save As.
In the Save As dialog box, select XML Document in the Save as Type list.
Enter a filename in the File Name text box.
Check the Save Data Only check box if it is not checked.
Check the Apply Transform check box is it is not checked, and then click the Transform button to select the transformation file (.xsl file) you want to use.
CAUTION
When you save a document using a transformation, only the results of the transformation are saved. Word will discard all the data that is not used in the transformation. See "What to Do If You Lose Data After Saving Your XML File," in the Troubleshooting section at the end of this chapter.
Click Save.