感觉上怎么说呢?反正是MS要极力推广XML呀!

且看:
打开Word
键入:

----------------------------------------------------

这是使用Office2003 Word 生成的一个XML文档

 

 

看看它的结构
---------------------------------------

在保存功能里,选择保存的格式为XML文档!


光看图标就感觉,靠,不一样了!!!是一个WordXML的图标yeah!而且,运行程序也变成了Word!起初以为是新安装了Office2003后把XML的文件关联给更改了。可是我想用IE直接打开它,没想到竟然弹出了下载对话框!!!如是执行打开操作,还是在IE里嵌入Office组件运行!晕!!!难道是个假的XML文件?
直接用个文本编辑器打开它!用的是MSVS2003.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:w="
http://schemas.microsoft.com/office/word/2003/wordml" xmlns:v="urn:schemas-microsoft-com:vml"
 xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:sl="
http://schemas.microsoft.com/schemaLibrary/2003/core"
 xmlns:aml="
http://schemas.microsoft.com/aml/2001/core" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
 xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
 w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">
 <o:DocumentProperties>
  <o:Title>这是使用Office2003 Word 生成的一个XML文档</o:Title>
  <o:Author>DSclub</o:Author>
  <o:LastAuthor>DSclub</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>1</o:TotalTime>
  <o:Created>2004-06-30T01:59:00Z</o:Created>
  <o:LastSaved>2004-06-30T01:59:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>5</o:Words>
  <o:Characters>35</o:Characters>
  <o:Company>Microsoft</o:Company>
  <o:Lines>1</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>39</o:CharactersWithSpaces>
  <o:Version>11.5604</o:Version>
 </o:DocumentProperties>
 <w:fonts>
  <w:defaultFonts w:ascii="Times New Roman" w:fareast="宋体" w:h-ansi="Times New Roman" w:cs="Times New Roman" />
  <w:font w:name="宋体">
   <w:altName w:val="SimSun" />
   <w:panose-1 w:val="02010600030101010101" />
   <w:charset w:val="86" />
   <w:family w:val="Auto" />
   <w:pitch w:val="variable" />
   <w:sig w:usb-0="00000003" w:usb-1="080E0000" w:usb-2="00000010" w:usb-3="00000000" w:csb-0="00040001"
    w:csb-1="00000000" />
  </w:font>
  <w:font w:name="@宋体">
   <w:panose-1 w:val="02010600030101010101" />
   <w:charset w:val="86" />
   <w:family w:val="Auto" />
   <w:pitch w:val="variable" />
   <w:sig w:usb-0="00000003" w:usb-1="080E0000" w:usb-2="00000010" w:usb-3="00000000" w:csb-0="00040001"
    w:csb-1="00000000" />
  </w:font>
 </w:fonts>
 <w:styles>
  <w:versionOfBuiltInStylenames w:val="4" />
  <w:latentStyles w:defLockedState="off" w:latentStyleCount="156" />
  <w:style w:type="paragraph" w:default="on" w:styleId="a">
   <w:name w:val="Normal" />
   <wx:uiName wx:val="正文" />
   <w:rsid w:val="006C499D" />
   <w:pPr>
    <w:widowControl w:val="off" />
    <w:jc w:val="both" />
   </w:pPr>
   <w:rPr>
    <wx:font wx:val="Times New Roman" />
    <w:kern w:val="2" />
    <w:sz w:val="21" />
    <w:sz-cs w:val="24" />
    <w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA" />
   </w:rPr>
  </w:style>
  <w:style w:type="character" w:default="on" w:styleId="a0">
   <w:name w:val="Default Paragraph Font" />
   <wx:uiName wx:val="默认段落字体" />
   <w:semiHidden />
  </w:style>
  <w:style w:type="table" w:default="on" w:styleId="a1">
   <w:name w:val="Normal Table" />
   <wx:uiName wx:val="普通表格" />
   <w:semiHidden />
   <w:rPr>
    <wx:font wx:val="Times New Roman" />
   </w:rPr>
   <w:tblPr>
    <w:tblInd w:w="0" w:type="dxa" />
    <w:tblCellMar>
     <w:top w:w="0" w:type="dxa" />
     <w:left w:w="108" w:type="dxa" />
     <w:bottom w:w="0" w:type="dxa" />
     <w:right w:w="108" w:type="dxa" />
    </w:tblCellMar>
   </w:tblPr>
  </w:style>
  <w:style w:type="list" w:default="on" w:styleId="a2">
   <w:name w:val="No List" />
   <wx:uiName wx:val="无列表" />
   <w:semiHidden />
  </w:style>
 </w:styles>
 <w:divs>
  <w:div w:id="1865243346">
   <w:bodyDiv w:val="on" />
   <w:marLeft w:val="0" />
   <w:marRight w:val="0" />
   <w:marTop w:val="0" />
   <w:marBottom w:val="0" />
   <w:divBdr>
    <w:top w:val="none" w:sz="0" wx:bdrwidth="0" w:space="0" w:color="auto" />
    <w:left w:val="none" w:sz="0" wx:bdrwidth="0" w:space="0" w:color="auto" />
    <w:bottom w:val="none" w:sz="0" wx:bdrwidth="0" w:space="0" w:color="auto" />
    <w:right w:val="none" w:sz="0" wx:bdrwidth="0" w:space="0" w:color="auto" />
   </w:divBdr>
  </w:div>
 </w:divs>
 <w:shapeDefaults>
  <o:shapedefaults v:ext="edit" spidmax="2050" />
  <o:shapelayout v:ext="edit">
   <o:idmap v:ext="edit" data="1" />
  </o:shapelayout>
 </w:shapeDefaults>
 <w:docPr>
  <w:view w:val="print" />
  <w:zoom w:percent="100" />
  <w:doNotEmbedSystemFonts />
  <w:bordersDontSurroundHeader />
  <w:bordersDontSurroundFooter />
  <w:proofState w:spelling="clean" w:grammar="clean" />
  <w:attachedTemplate w:val="" />
  <w:defaultTabStop w:val="420" />
  <w:drawingGridVerticalSpacing w:val="156" />
  <w:displayHorizontalDrawingGridEvery w:val="0" />
  <w:displayVerticalDrawingGridEvery w:val="2" />
  <w:punctuationKerning />
  <w:characterSpacingControl w:val="CompressPunctuation" />
  <w:optimizeForBrowser />
  <w:validateAgainstSchema />
  <w:saveInvalidXML w:val="off" />
  <w:ignoreMixedContent w:val="off" />
  <w:alwaysShowPlaceholderText w:val="off" />
  <w:compat>
   <w:spaceForUL />
   <w:balanceSingleByteDoubleByteWidth />
   <w:doNotLeaveBackslashAlone />
   <w:ulTrailSpace />
   <w:doNotExpandShiftReturn />
   <w:adjustLineHeightInTable />
   <w:dontAllowFieldEndSelect />
   <w:useWord2002TableStyleRules />
   <w:useFELayout />
  </w:compat>
 </w:docPr>
 <w:body>
  <wx:sect>
   <w:p>
    <w:r>
     <w:rPr>
      <w:rFonts w:hint="fareast" />
      <wx:font wx:val="宋体" />
     </w:rPr>
     <w:t>这是使用</w:t>
    </w:r>
    <w:r>
     <w:t>Office2003 Word </w:t>
    </w:r>
    <w:r>
     <w:rPr>
      <w:rFonts w:hint="fareast" />
      <wx:font wx:val="宋体" />
     </w:rPr>
     <w:t>生成的一个</w:t>
    </w:r>
    <w:r>
     <w:t>XML</w:t>
    </w:r>
    <w:r>
     <w:rPr>
      <w:rFonts w:hint="fareast" />
      <wx:font wx:val="宋体" />
     </w:rPr>
     <w:t>文档</w:t>
    </w:r>
   </w:p>
   <w:p />
   <w:p />
   <w:p>
    <w:r>
     <w:rPr>
      <w:rFonts w:hint="fareast" />
      <wx:font wx:val="宋体" />
     </w:rPr>
     <w:t>看看它的结构</w:t>
    </w:r>
   </w:p>
   <w:sectPr>
    <w:pgSz w:w="11906" w:h="16838" />
    <w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="851" w:footer="992"
     w:gutter="0" />
    <w:cols w:space="425" />
    <w:docGrid w:type="lines" w:line-pitch="312" />
   </w:sectPr>
  </wx:sect>
 </w:body>
</w:wordDocument>


一眼看过去,就是感觉
<?mso-application progid="Word.Document"?>这句话比较特别,mso-application,偶没见过这个命令!

去掉了这个命令,就是一个正常的XML文档了!

呵呵,有学了一招…………


不过我在想,MS为了推广XML真是下了大力气,Doc文档的格式一直都被MS给把持着,但如今能以XML的形式发布了,呵呵,不久Doc也不再是什么秘密了

posted on 2004-06-30 10:26  雪美·考拉  阅读(1995)  评论(7编辑  收藏  举报