chore: write simple xml

main
bokuweb 2019-09-13 19:41:05 +09:00
parent bb0f37f2c2
commit efe4e0f118
28 changed files with 273 additions and 4 deletions

10
Cargo.lock generated
View File

@ -3,4 +3,14 @@
[[package]]
name = "docx-core"
version = "0.1.0"
dependencies = [
"xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "xml-rs"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5"

View File

@ -6,4 +6,5 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
[dependencies]
xml-rs = "0.8.0"

View File

@ -1,5 +1,5 @@
extern crate docx_core;
fn main() {
println!("{}", docx_core::add_one(1));
docx_core::simple();
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Override PartName="/_rels/.rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/word/_rels/document.xml.rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/><Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
</Types>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
</Relationships>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Template></Template><TotalTime>0</TotalTime><Application>LibreOffice/6.0.7.3$Linux_X86_64 LibreOffice_project/00m0$Build-3</Application><Pages>1</Pages><Words>1</Words><Characters>5</Characters><CharactersWithSpaces>5</CharactersWithSpaces><Paragraphs>1</Paragraphs></Properties>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dcterms:created xsi:type="dcterms:W3CDTF">2019-09-13T19:32:17Z</dcterms:created><dc:creator></dc:creator><dc:description></dc:description><dc:language>ja-JP</dc:language><cp:lastModifiedBy></cp:lastModifiedBy><dcterms:modified xsi:type="dcterms:W3CDTF">2019-09-13T19:32:34Z</dcterms:modified><cp:revision>1</cp:revision><dc:subject></dc:subject><dc:title></dc:title></cp:coreProperties>

Binary file not shown.

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Target="fontTable.xml"/>
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Target="settings.xml"/>
</Relationships>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14 wp14">
<w:body>
<w:p>
<w:pPr>
<w:pStyle w:val="Normal"/>
<w:rPr></w:rPr>
</w:pPr>
<w:r>
<w:rPr></w:rPr>
<w:t>Hello</w:t>
</w:r>
</w:p>
<w:sectPr>
<w:type w:val="nextPage"/>
<w:pgSz w:w="11906" w:h="16838"/>
<w:pgMar w:left="1134" w:right="1134" w:header="0" w:top="1134" w:footer="0" w:bottom="1134" w:gutter="0"/>
<w:pgNumType w:fmt="decimal"/>
<w:formProt w:val="false"/>
<w:textDirection w:val="lrTb"/>
</w:sectPr>
</w:body>
</w:document>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:fonts xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
<w:font w:name="Times New Roman">
<w:charset w:val="00"/>
<w:family w:val="roman"/>
<w:pitch w:val="variable"/>
</w:font>
<w:font w:name="Symbol">
<w:charset w:val="02"/>
<w:family w:val="roman"/>
<w:pitch w:val="variable"/>
</w:font>
<w:font w:name="Arial">
<w:charset w:val="00"/>
<w:family w:val="swiss"/>
<w:pitch w:val="variable"/>
</w:font>
<w:font w:name="Liberation Serif">
<w:altName w:val="Times New Roman"/>
<w:charset w:val="01"/>
<w:family w:val="roman"/>
<w:pitch w:val="variable"/>
</w:font>
<w:font w:name="Liberation Sans">
<w:altName w:val="Arial"/>
<w:charset w:val="01"/>
<w:family w:val="swiss"/>
<w:pitch w:val="variable"/>
</w:font>
</w:fonts>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:settings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:zoom w:percent="100"/>
<w:defaultTabStop w:val="709"/>
<w:compat>
<w:doNotExpandShiftReturn/>
</w:compat>
</w:settings>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="w14">
<w:docDefaults>
<w:rPrDefault>
<w:rPr>
<w:rFonts w:ascii="Liberation Serif" w:hAnsi="Liberation Serif" w:eastAsia="Noto Sans CJK JP" w:cs="Lohit Devanagari"/>
<w:kern w:val="2"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
<w:lang w:val="en-US" w:eastAsia="ja-JP" w:bidi="hi-IN"/>
</w:rPr>
</w:rPrDefault>
<w:pPrDefault>
<w:pPr>
<w:widowControl/>
</w:pPr>
</w:pPrDefault>
</w:docDefaults>
<w:style w:type="paragraph" w:styleId="Normal">
<w:name w:val="Normal"/>
<w:qFormat/>
<w:pPr>
<w:widowControl/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Liberation Serif" w:hAnsi="Liberation Serif" w:eastAsia="Noto Sans CJK JP" w:cs="Lohit Devanagari"/>
<w:color w:val="auto"/>
<w:kern w:val="2"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
<w:lang w:val="en-US" w:eastAsia="ja-JP" w:bidi="hi-IN"/>
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Style14">
<w:name w:val="見出し"/>
<w:basedOn w:val="Normal"/>
<w:next w:val="Style15"/>
<w:qFormat/>
<w:pPr>
<w:keepNext w:val="true"/>
<w:spacing w:before="240" w:after="120"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Liberation Sans" w:hAnsi="Liberation Sans" w:eastAsia="Noto Sans CJK JP" w:cs="Lohit Devanagari"/>
<w:sz w:val="28"/>
<w:szCs w:val="28"/>
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Style15">
<w:name w:val="Body Text"/>
<w:basedOn w:val="Normal"/>
<w:pPr>
<w:spacing w:lineRule="auto" w:line="276" w:before="0" w:after="140"/>
</w:pPr>
<w:rPr></w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Style16">
<w:name w:val="List"/>
<w:basedOn w:val="Style15"/>
<w:pPr></w:pPr>
<w:rPr>
<w:rFonts w:cs="Lohit Devanagari"/>
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Style17">
<w:name w:val="Caption"/>
<w:basedOn w:val="Normal"/>
<w:qFormat/>
<w:pPr>
<w:suppressLineNumbers/>
<w:spacing w:before="120" w:after="120"/>
</w:pPr>
<w:rPr>
<w:rFonts w:cs="Lohit Devanagari"/>
<w:i/>
<w:iCs/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
</w:style>
<w:style w:type="paragraph" w:styleId="Style18">
<w:name w:val="索引"/>
<w:basedOn w:val="Normal"/>
<w:qFormat/>
<w:pPr>
<w:suppressLineNumbers/>
</w:pPr>
<w:rPr>
<w:rFonts w:cs="Lohit Devanagari"/>
</w:rPr>
</w:style>
</w:styles>

View File

@ -0,0 +1 @@
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default ContentType="image/png" Extension="png"></Default><Default ContentType="image/jpeg" Extension="jpeg"></Default><Default ContentType="image/jpeg" Extension="jpg"></Default><Default ContentType="image/bmp" Extension="bmp"></Default><Default ContentType="image/gif" Extension="gif"></Default><Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"></Default><Default ContentType="application/xml" Extension="xml"></Default><Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" PartName="/word/document.xml"></Override><Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml" PartName="/word/styles.xml"></Override><Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"></Override><Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"></Override><Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml" PartName="/word/numbering.xml"></Override><Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml" PartName="/word/footnotes.xml"></Override><Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml" PartName="/word/header1.xml"></Override><Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml" PartName="/word/footer1.xml"></Override></Types>

View File

@ -0,0 +1 @@
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"></Relationship><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"></Relationship><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"></Relationship></Relationships>

View File

@ -0,0 +1 @@
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"></Properties>

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>Un-named</dc:creator><cp:lastModifiedBy>Un-named</cp:lastModifiedBy><cp:revision>1</cp:revision><dcterms:created xsi:type="dcterms:W3CDTF">2019-09-13T19:25:28Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2019-09-13T19:25:28Z</dcterms:modified></cp:coreProperties>

View File

@ -0,0 +1 @@
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"></Relationship><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" Target="numbering.xml"></Relationship><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" Target="footnotes.xml"></Relationship><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" Target="header1.xml"></Relationship><Relationship Id="rId5" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" Target="footer1.xml"></Relationship></Relationships>

View File

@ -0,0 +1 @@
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>

View File

@ -0,0 +1 @@
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>

View File

@ -0,0 +1,44 @@
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 wp14">
<w:body>
<w:p>
<w:pPr>
</w:pPr>
<w:r>
<w:rPr>
</w:rPr>
<w:t xml:space="preserve">Hello World</w:t>
</w:r>
</w:p>
<w:sectPr>
<w:pgSz w:w="11906" w:h="16838" w:orient="portrait">
</w:pgSz>
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="708" w:footer="708" w:gutter="0">
</w:pgMar>
<w:cols w:space="708">
</w:cols>
<w:docGrid w:linePitch="360">
</w:docGrid>
<w:headerReference w:type="default" r:id="rId4">
</w:headerReference>
<w:footerReference w:type="default" r:id="rId5">
</w:footerReference>
<w:pgNumType w:fmt="decimal">
</w:pgNumType>
</w:sectPr>
</w:body>
</w:document>

View File

@ -0,0 +1 @@
<w:ftr xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"></w:ftr>

View File

@ -0,0 +1 @@
<w:footnotes xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 wp14"><w:footnote w:type="separator" w:id="-1"><w:p><w:pPr><w:spacing w:after="0" w:line="240" w:lineRule="auto"></w:spacing></w:pPr><w:r><w:rPr><w:rStyle w:val="FootnoteReference"></w:rStyle></w:rPr><w:footnoteRef></w:footnoteRef></w:r><w:r><w:rPr></w:rPr><w:separator></w:separator></w:r></w:p></w:footnote><w:footnote w:type="continuationSeparator" w:id="0"><w:p><w:pPr><w:spacing w:after="0" w:line="240" w:lineRule="auto"></w:spacing></w:pPr><w:r><w:rPr><w:rStyle w:val="FootnoteReference"></w:rStyle></w:rPr><w:footnoteRef></w:footnoteRef></w:r><w:r><w:rPr></w:rPr><w:continuationSeparator></w:continuationSeparator></w:r></w:p></w:footnote></w:footnotes>

View File

@ -0,0 +1 @@
<w:hdr xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"></w:hdr>

View File

@ -0,0 +1 @@
<w:numbering xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 wp14"><w:abstractNum w:abstractNumId="0" w15:restartNumberingAfterBreak="0"><w:multiLevelType w:val="hybridMultilevel"></w:multiLevelType><w:lvl w:ilvl="0" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="●"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="720" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="1" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="○"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="1440" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="2" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="■"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="2160" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="3" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="●"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="2880" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="4" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="○"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="3600" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="5" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="■"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="4320" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="6" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="●"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="5040" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="7" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="○"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="5760" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl><w:lvl w:ilvl="8" w15:tentative="1"><w:start w:val="1"></w:start><w:numFmt w:val="bullet"></w:numFmt><w:lvlText w:val="■"></w:lvlText><w:lvlJc w:val="left"></w:lvlJc><w:pPr><w:ind w:left="6480" w:hanging="360"></w:ind></w:pPr><w:rPr></w:rPr></w:lvl></w:abstractNum><w:num w:numId="1"><w:abstractNumId w:val="0"></w:abstractNumId></w:num></w:numbering>

View File

@ -0,0 +1 @@
<w:styles xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" mc:Ignorable="w14 w15"><w:docDefaults><w:rPrDefault><w:rPr></w:rPr></w:rPrDefault><w:pPrDefault><w:pPr></w:pPr></w:pPrDefault></w:docDefaults><w:style w:type="paragraph" w:styleId="Title"><w:name w:val="Title"></w:name><w:pPr></w:pPr><w:rPr><w:sz w:val="56"></w:sz></w:rPr><w:basedOn w:val="Normal"></w:basedOn><w:next w:val="Normal"></w:next><w:qFormat></w:qFormat></w:style><w:style w:type="paragraph" w:styleId="Heading1"><w:name w:val="Heading 1"></w:name><w:pPr></w:pPr><w:rPr><w:color w:val="2E74B5"></w:color><w:sz w:val="32"></w:sz></w:rPr><w:basedOn w:val="Normal"></w:basedOn><w:next w:val="Normal"></w:next><w:qFormat></w:qFormat></w:style><w:style w:type="paragraph" w:styleId="Heading2"><w:name w:val="Heading 2"></w:name><w:pPr></w:pPr><w:rPr><w:color w:val="2E74B5"></w:color><w:sz w:val="26"></w:sz></w:rPr><w:basedOn w:val="Normal"></w:basedOn><w:next w:val="Normal"></w:next><w:qFormat></w:qFormat></w:style><w:style w:type="paragraph" w:styleId="Heading3"><w:name w:val="Heading 3"></w:name><w:pPr></w:pPr><w:rPr><w:color w:val="1F4D78"></w:color><w:sz w:val="24"></w:sz></w:rPr><w:basedOn w:val="Normal"></w:basedOn><w:next w:val="Normal"></w:next><w:qFormat></w:qFormat></w:style><w:style w:type="paragraph" w:styleId="Heading4"><w:name w:val="Heading 4"></w:name><w:pPr></w:pPr><w:rPr><w:color w:val="2E74B5"></w:color><w:i w:val="true"></w:i></w:rPr><w:basedOn w:val="Normal"></w:basedOn><w:next w:val="Normal"></w:next><w:qFormat></w:qFormat></w:style><w:style w:type="paragraph" w:styleId="Heading5"><w:name w:val="Heading 5"></w:name><w:pPr></w:pPr><w:rPr><w:color w:val="2E74B5"></w:color></w:rPr><w:basedOn w:val="Normal"></w:basedOn><w:next w:val="Normal"></w:next><w:qFormat></w:qFormat></w:style><w:style w:type="paragraph" w:styleId="Heading6"><w:name w:val="Heading 6"></w:name><w:pPr></w:pPr><w:rPr><w:color w:val="1F4D78"></w:color></w:rPr><w:basedOn w:val="Normal"></w:basedOn><w:next w:val="Normal"></w:next><w:qFormat></w:qFormat></w:style><w:style w:type="paragraph" w:styleId="ListParagraph"><w:pPr></w:pPr><w:rPr></w:rPr><w:name w:val="List Paragraph"></w:name><w:basedOn w:val="Normal"></w:basedOn><w:qFormat></w:qFormat></w:style><w:style w:type="character" w:styleId="Hyperlink"><w:name w:val="Hyperlink"></w:name><w:rPr><w:color w:val="0563C1"></w:color><w:u w:val="single"></w:u></w:rPr><w:uiPriority w:val="99"></w:uiPriority><w:unhideWhenUsed></w:unhideWhenUsed><w:basedOn w:val="DefaultParagraphFont"></w:basedOn></w:style><w:style w:type="character" w:styleId="FootnoteReference"><w:name w:val="footnote reference"></w:name><w:basedOn w:val="DefaultParagraphFont"></w:basedOn><w:uiPriority w:val="99"></w:uiPriority><w:semiHidden></w:semiHidden><w:unhideWhenUsed></w:unhideWhenUsed><w:rPr><w:vertAlign w:val="superscript"></w:vertAlign></w:rPr></w:style><w:style w:type="paragraph" w:styleId="FootnoteText"><w:pPr><w:spacing w:after="0" w:line="240" w:lineRule="auto"></w:spacing></w:pPr><w:rPr><w:sz w:val="20"></w:sz><w:szCs w:val="20"></w:szCs></w:rPr><w:name w:val="footnote text"></w:name><w:basedOn w:val="Normal"></w:basedOn><w:link w:val="FootnoteTextChar"></w:link><w:uiPriority w:val="99"></w:uiPriority><w:semiHidden></w:semiHidden><w:unhideWhenUsed></w:unhideWhenUsed></w:style><w:style w:type="character" w:styleId="FootnoteTextChar"><w:name w:val="Footnote Text Char"></w:name><w:rPr><w:sz w:val="20"></w:sz><w:szCs w:val="20"></w:szCs></w:rPr><w:uiPriority w:val="99"></w:uiPriority><w:unhideWhenUsed></w:unhideWhenUsed><w:basedOn w:val="DefaultParagraphFont"></w:basedOn><w:link w:val="FootnoteText"></w:link><w:uiPriority w:val="99"></w:uiPriority><w:semiHidden></w:semiHidden></w:style></w:styles>

View File

@ -1,4 +1,24 @@
use std::fs::File;
use std::io::{self, Write};
pub fn add_one(x: i32) -> i32 {
x + 1
use xml::writer::{EmitterConfig, EventWriter, Result, XmlEvent};
pub fn simple() {
let mut file = File::create("./dist/output.xml").unwrap();
let mut b = Vec::new();
let mut w = EmitterConfig::new()
.write_document_declaration(false)
.create_writer(&mut b);
w.write(XmlEvent::start_element("h:hello").ns("h", "urn:hello-world"))
.unwrap();
w.write("hello world").unwrap();
w.write(XmlEvent::end_element()).unwrap();
file.write_all(&b).unwrap();
file.flush().unwrap();
// assert_eq!(
// str::from_utf8(&b).unwrap(),
// r#"<h:hello xmlns:h="urn:hello-world">hello world</h:hello>"#
// );
}