XML 和 Office 的集成
l Plain XML vs Word XML:
Your XML
WordML
Microsoft Corp.
2/21/2003
Strong Buy
Word
Microsoft Corp.
2/21/2003
Strong Buy
Microsoft Corp.
2/21/2003
Strong Buy
Save ‘Data Only’ or Transform
Transform
Open/Save
Database
WYSIWYG
Web Page
Microsoft Corp.
2/21/2003
Strong Buy
Trans-form

| There are two flavors of XML that Word can save to: plain XML and Word XML (otherwise known as WordML). Aside from the XML data, WordML contains all of the formatting instructions that make up a Word document. It is, essentially, a Word document, but not in the binary .doc format. If you were to look at the XML in a WordML document, a high percentage of the XML is dedicated to formatting and properties of the Word document. The advantage here is that the data portion still exists and can be acquired from the document. For example, you can load the documents into a DOM object and use standard XPath to extract either the data or formatting information. Another scenario that WordML offers is that WordML documents can be created on a server without using Word.
| Plain XML is most useful when you know that you will only be interested in the data, and not the formatting information.
| It is also worth noting that you can still save the document in the .doc format.