Page 1 of 1

How to understand docx document.xml elements

PostPosted: Sun Jan 25, 2015 4:50 am
by shanmukhan
Hi All,

Please let me know if there is any tutorial to understand docx document.xml's all elements.

Ex: I understan that <w:p> is a paragraph, <w:t> is a text, but what is <w:pPr> element.
How do I understand all other xml elements.

<w:p w:rsidR="00B8629A" w:rsidRPr="00962004" w:rsidRDefault="00962004" w:rsidP="00B8629A">
<w:pPr>
<w:rPr>
<w:color w:val="FF0000"/>
</w:rPr>
</w:pPr>
<w:r w:rsidRPr="00962004">
<w:rPr>
<w:color w:val="FF0000"/>
</w:rPr>
<w:t>Geometrical</w:t>
</w:r>
</w:p>

Re: How to understand docx document.xml elements

PostPosted: Mon Jan 26, 2015 2:14 pm
by Jeutnarg
There is no short answer, but if you go here: http://www.ecma-international.org/news/ ... e_docs.htm

and get the pdf from "Part 1 - Fundamentals", then you should be able to get the basics.

Re: How to understand docx document.xml elements

PostPosted: Mon Jan 26, 2015 2:22 pm
by Jeutnarg
Well, I can't figure out how to edit my previous post, but these are other good resources:
(Unfortunately, there doesn't seem to be much of a quick resource. If you want to understand this xml formatting standard, it'll be awhile.)
https://msdn.microsoft.com/en-us/opensp ... 37328.aspx

Re: How to understand docx document.xml elements

PostPosted: Tue Jan 27, 2015 5:28 pm
by shanmukhan
thank you very much for the information.

Re: How to understand docx document.xml elements

PostPosted: Thu Jan 29, 2015 11:16 am
by jason
You can upload your docx to the docx4j webapp (or use the docx4jHelper Word AddIn), then click on the element you're interested in. You'll not only generate code, but also get a deep link into the webapp copy of the relevant spec text.

The table of contents for WordML is at webapp.docx4java.org/OnlineDemo/ecma376/WordML/index.html

Another useful intro is Wouter's free pdf book "OpenXML explained". You can google for that.