XML to WordML basics
- by Level1Coder
I'm new to the world of XML. I'm not sure which way to build the XML so I provided 2 examples below.
My question is: Given the XML, how do I transform either Example#1 / #2 to the WordML Result? What technologies do I need to accomplish this?
Example#1:
<NumberedList1>
<Paragraph>Paragraph one.</Paragraph>
</NumberedList1>
Example#2:
<NumberedList>1</NumberedList>
<Paragraph>Paragraph one.</Paragraph>
After transformation...
WordML Result:
<w:p>
<w:pPr>
<w:pStyle w:val="ListParagraph"/>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="1"/>
</w:numPr>
</w:pPr>
<w:r>
<w:t>Paragraph one.</w:t>
</w:r>
</w:p>
If there is a way to transform the XML to WordML, maybe I can opt to save the data in XML format in the db instead of building both XML and WordML on the fly for 2 different formats.