Word2003Xml格式摸索 1

来源:互联网 发布:dnf辅助网站源码 编辑:程序博客网 时间:2024/06/09 14:10

文件NS声明,肯定要留着的

<span style="font-size:14px;"><?mso-application progid="Word.Document"?><w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">  <w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/></span>

文件信息,作者,版本 blabla, 可删除,不影响Word2007读取,更改保存后,自动重新填入

<!-- 文件信息,作者,版本 blabla, 可删除,不影响Word2007读取,更改保存后,自动重新填入 --><span style="white-space:pre"></span><span style="white-space:pre"></span><o:DocumentProperties><span style="white-space:pre"></span><o:Author>lenovo</o:Author><span style="white-space:pre"></span><o:LastAuthor>lenovo</o:LastAuthor><span style="white-space:pre"></span><o:Revision>12</o:Revision><span style="white-space:pre"></span><o:TotalTime>16</o:TotalTime><span style="white-space:pre"></span><o:Created>2014-11-23T12:57:00Z</o:Created><span style="white-space:pre"></span><o:LastSaved>2014-11-24T02:58:00Z</o:LastSaved><span style="white-space:pre"></span><o:Pages>1</o:Pages><span style="white-space:pre"></span><o:Words>12</o:Words><span style="white-space:pre"></span><o:Characters>69</o:Characters><span style="white-space:pre"></span><o:Lines>1</o:Lines><span style="white-space:pre"></span><o:Paragraphs>1</o:Paragraphs><span style="white-space:pre"></span><o:CharactersWithSpaces>80</o:CharactersWithSpaces><span style="white-space:pre"></span><o:Version>12</o:Version><span style="white-space:pre"></span></o:DocumentProperties>


文中使用的字体信息,可删除,不影响MS Word 2007读取

<span style="font-size:14px;"><w:fonts><w:defaultFonts w:ascii="Calibri" w:fareast="宋体" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:font w:name="Times New Roman"><w:panose-1 w:val="02020603050405020304"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="E0002AFF" w:usb-1="C0007841" w:usb-2="00000009" w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000"/></w:font><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="288F0000" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="00040001" w:csb-1="00000000"/></w:font><w:font w:name="Cambria Math"><w:panose-1 w:val="02040503050406030204"/><w:charset w:val="01"/><w:family w:val="Roman"/><w:notTrueType/><w:pitch w:val="variable"/><w:sig w:usb-0="00000000" w:usb-1="00000000" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="00000000" w:csb-1="00000000"/></w:font><w:font w:name="Cambria"><w:panose-1 w:val="02040503050406030204"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="E00002FF" w:usb-1="400004FF" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="0000019F" w:csb-1="00000000"/></w:font><w:font w:name="Calibri"><w:panose-1 w:val="020F0502020204030204"/><w:charset w:val="00"/><w:family w:val="Swiss"/><w:pitch w:val="variable"/><w:sig w:usb-0="E00002FF" w:usb-1="4000ACFF" w:usb-2="00000001" w:usb-3="00000000" w:csb-0="0000019F" 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="288F0000" w:usb-2="00000016" w:usb-3="00000000" w:csb-0="00040001" w:csb-1="00000000"/></w:font></w:fonts></span>

w:list ?估计列表的序号定义,删除后,不影响本机读。估计没有定义过列表的机器会有问题,未测。

<w:lists><w:listDef w:listDefId="0"><w:lsid w:val="157030E0"/><w:plt w:val="HybridMultilevel"/><w:tmpl w:val="6A14DF82"/><w:lvl w:ilvl="0" w:tplc="728E415A"><w:start w:val="1"/><w:pStyle w:val="5"/><w:lvlText w:val="%1."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="420" w:hanging="420"/></w:pPr><w:rPr><w:rFonts w:hint="fareast"/></w:rPr></w:lvl><w:lvl w:ilvl="1" w:tplc="04090019" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="4"/><w:lvlText w:val="%2)"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="840" w:hanging="420"/></w:pPr></w:lvl><w:lvl w:ilvl="2" w:tplc="0409001B" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="2"/><w:lvlText w:val="%3."/><w:lvlJc w:val="right"/><w:pPr><w:ind w:left="1260" w:hanging="420"/></w:pPr></w:lvl><w:lvl w:ilvl="3" w:tplc="0409000F" w:tentative="on"><w:start w:val="1"/><w:lvlText w:val="%4."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1680" w:hanging="420"/></w:pPr></w:lvl><w:lvl w:ilvl="4" w:tplc="04090019" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="4"/><w:lvlText w:val="%5)"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2100" w:hanging="420"/></w:pPr></w:lvl><w:lvl w:ilvl="5" w:tplc="0409001B" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="2"/><w:lvlText w:val="%6."/><w:lvlJc w:val="right"/><w:pPr><w:ind w:left="2520" w:hanging="420"/></w:pPr></w:lvl><w:lvl w:ilvl="6" w:tplc="0409000F" w:tentative="on"><w:start w:val="1"/><w:lvlText w:val="%7."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2940" w:hanging="420"/></w:pPr></w:lvl><w:lvl w:ilvl="7" w:tplc="04090019" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="4"/><w:lvlText w:val="%8)"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3360" w:hanging="420"/></w:pPr></w:lvl><w:lvl w:ilvl="8" w:tplc="0409001B" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="2"/><w:lvlText w:val="%9."/><w:lvlJc w:val="right"/><w:pPr><w:ind w:left="3780" w:hanging="420"/></w:pPr></w:lvl></w:listDef><w:list w:ilfo="1"><w:ilst w:val="0"/></w:list></w:lists>

样式定义块,应该可以删除一些,不需要使用的样式,减少XML文件大小。

<w:styles><w:versionOfBuiltInStylenames w:val="7"/><w:latentStyles w:defLockedState="off" w:latentStyleCount="267"><w:lsdException w:name="Normal"/><w:lsdException w:name="heading 1"/><w:lsdException w:name="heading 2"/><w:lsdException w:name="heading 3"/><w:lsdException w:name="heading 4"/><w:lsdException w:name="heading 5"/><w:lsdException w:name="heading 6"/><w:lsdException w:name="heading 7"/><w:lsdException w:name="heading 8"/><w:lsdException w:name="heading 9"/><w:lsdException w:name="caption"/><w:lsdException w:name="Title"/><w:lsdException w:name="Subtitle"/><w:lsdException w:name="Strong"/><w:lsdException w:name="Emphasis"/><w:lsdException w:name="No Spacing"/><w:lsdException w:name="List Paragraph"/><w:lsdException w:name="Quote"/><w:lsdException w:name="Intense Quote"/><w:lsdException w:name="Subtle Emphasis"/><w:lsdException w:name="Intense Emphasis"/><w:lsdException w:name="Subtle Reference"/><w:lsdException w:name="Intense Reference"/><w:lsdException w:name="Book Title"/><w:lsdException w:name="TOC Heading"/></w:latentStyles><w:style w:type="paragraph" w:default="on" w:styleId="a"><w:name w:val="Normal"/><wx:uiName wx:val="正文"/><w:rsid w:val="0035756F"/><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="22"/><w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="5"><w:name w:val="heading 5"/><wx:uiName wx:val="标题 5"/><w:basedOn w:val="a"/><w:next w:val="a"/><w:link w:val="5Char"/><w:rsid w:val="00415773"/><w:pPr><w:keepNext/><w:keepLines/><w:spacing w:before="280" w:after="290" w:line="376" w:line-rule="auto"/><w:outlineLvl w:val="4"/></w:pPr><w:rPr><wx:font wx:val="Times New Roman"/><w:b/><w:b-cs/><w:sz w:val="28"/><w:sz-cs w:val="28"/></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:style><w:style w:type="table" w:default="on" w:styleId="a1"><w:name w:val="Normal Table"/><wx:uiName wx:val="普通表格"/><w:rPr><wx:font wx:val="Times New Roman"/><w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/></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:style><w:style w:type="paragraph" w:styleId="a3"><w:name w:val="Title"/><wx:uiName wx:val="标题"/><w:basedOn w:val="a"/><w:next w:val="a"/><w:link w:val="Char"/><w:rsid w:val="00FE104C"/><w:pPr><w:spacing w:before="240" w:after="60"/><w:jc w:val="center"/><w:outlineLvl w:val="0"/></w:pPr><w:rPr><w:rFonts w:ascii="Cambria" w:h-ansi="Cambria"/><wx:font wx:val="Cambria"/><w:b/><w:b-cs/><w:sz w:val="32"/><w:sz-cs w:val="32"/></w:rPr></w:style><w:style w:type="character" w:styleId="Char"><w:name w:val="标题 Char"/><w:basedOn w:val="a0"/><w:link w:val="a3"/><w:rsid w:val="00FE104C"/><w:rPr><w:rFonts w:ascii="Cambria" w:h-ansi="Cambria" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:kern w:val="2"/><w:sz w:val="32"/><w:sz-cs w:val="32"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="50"><w:name w:val="标题5"/><w:basedOn w:val="5"/><w:next w:val="a"/><w:link w:val="5Char0"/><w:rsid w:val="00415773"/><w:pPr><w:tabs><w:tab w:val="list" w:pos="720"/></w:tabs><w:spacing w:before="120" w:after="0" w:line="240" w:line-rule="auto"/><w:ind w:left="284" w:hanging="284"/></w:pPr><w:rPr><wx:font wx:val="Times New Roman"/><w:sz w:val="24"/><w:sz-cs w:val="24"/></w:rPr></w:style><w:style w:type="character" w:styleId="5Char"><w:name w:val="标题 5 Char"/><w:basedOn w:val="a0"/><w:link w:val="5"/><w:rsid w:val="00415773"/><w:rPr><w:b/><w:b-cs/><w:kern w:val="2"/><w:sz w:val="28"/><w:sz-cs w:val="28"/></w:rPr></w:style><w:style w:type="character" w:styleId="5Char0"><w:name w:val="标题5 Char"/><w:basedOn w:val="5Char"/><w:link w:val="50"/><w:rsid w:val="00415773"/><w:rPr><w:b/><w:b-cs/><w:sz w:val="24"/><w:sz-cs w:val="24"/></w:rPr></w:style></w:styles>


Shape 难道是图形的?

<w:shapeDefaults><o:shapedefaults v:ext="edit" spidmax="7170"/><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout></w:shapeDefaults>

文档的打印信息,应该不用改,默认就行。可以用来设置纸张宽度、长度等

<span style="white-space:pre"></span><w:docPr><w:view w:val="print"/><w:zoom w:percent="100"/><w:doNotEmbedSystemFonts/><w:bordersDontSurroundHeader/><w:bordersDontSurroundFooter/><w:defaultTabStop w:val="420"/><w:drawingGridHorizontalSpacing w:val="105"/><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:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:dontGrowAutofit/><w:useFELayout/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val="000231F3"/><wsp:rsid wsp:val="000231F3"/><wsp:rsid wsp:val="00322A5C"/><wsp:rsid wsp:val="005D555E"/><wsp:rsid wsp:val="00A14BB9"/><wsp:rsid wsp:val="00D71B2E"/><wsp:rsid wsp:val="00E02868"/></wsp:rsids></w:docPr>


0 0
原创粉丝点击