Saving to XML

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.

Saving an XML Document Using WordML

To save an XML document that preserves all the Word document properties and settings, follow these steps (see Figure 25.30):

  1. Choose File, Save As.

  2. In the Save As dialog box, select XML Document in the Save as Type list.

  3. Enter a filename in the File Name text box.

  4. Clear the Save Data Only check box if it is checked.

  5. Click Save.

Figure 25.30. Saving an XML document using WordML.

graphics/25fig30.gif

Saving an XML Document Using XML Data Only

To save an XML document with only the data related to the attached schema, follow these steps (see Figure 25.31):

  1. Choose File, Save As.

  2. In the Save As dialog box, select XML Document in the Save as Type list.

  3. Enter a filename in the File Name text box.

  4. Check the Save Data Only check box if it is not checked.

  5. Click Save.

Figure 25.31. Saving an XML document using XML data only.

graphics/25fig31.gif

Saving an XML Document Using a Transformation

To save an XML document using a transformation, follow these steps (see Figure 25.32):

  1. Choose File, Save As.

  2. In the Save As dialog box, select XML Document in the Save as Type list.

  3. Enter a filename in the File Name text box.

  4. Check the Save Data Only check box if it is not checked.

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

  6. Click Save.

Figure 25.32. Saving an XML document using a transformation.

graphics/25fig32.gif



    Part I: Word Basics: Get Productive Fast
    Part II: Building Slicker Documents Faster
    Part III: The Visual Word: Making Documents Look Great
    Part IV: Industrial-Strength Document Production Techniques
    Part VI: The Corporate Word