Learning WORDML - Part 2
Now that we have come to know about WordML lets move a bit deep in understanding
Obviously this must be the question while using any newer technology every time. Make repeated query and study why this newer technology is introduced, what made them to device a higher version and other stuffs. This exercise would give a deeper insight of the current technology and a way to understand the disadvantages and discomforts in the earlier ones. Again back to square one. Why WordML? Earlier versions on Word doesn't provide any option to save the Word in XML.Reading any particular data from a Word Document was a difficult task.It was converted to HTML, then after some operations it was converted to XML and then it was analyzed. Now with the facility of WordML analysis of Word Documents has become much much simpler.
Once the XML is in hand, we can really play around with XML and manipulate on the contents very easily.
What is WordML made of?
In the previous write-up there was a simple example of WordML, lets recollect it again
<w:t>Have a Great Day Ahead</w:t>
The document is collection of Paragraphs (w:p)
The Paragraph is made up of Text Runs (w:r)
The Text Runs are made up of Text Pieces (w:t)
The xml document is ready. Save the above lines in SampleWordml.xml and save it. When you double click on the icon the file is opened in IE (by default). But suppose we wanted to view the same in Word while double clicking add a line of code
Once this change is made and saved, the icon itself changes and clicking on the icon directly opens in a Word.
What if not a perfect WordML?
Suppose there is some typo error or missed closing a tag in the WordML what happens when we try to open the same file in Word? Word doesn't automatically close the tag instead it gives an error on opening the doc. The line number and type of error can also be obtained
A small error was made in <w:t> Tag. The Word dint open the same document and gave an error.
More in the next ...
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here