I need to convert the following XML
<Para>
<Unique value="998197" type="enum" />
<PgfTag value="Body" type="str" />
<Pgf>
<PgfFont>
<FFamily value="Times New Roman" type="str" />
</PgfFont>
</Pgf>
<ParaLine>
<TextRectID value="19" type="enum" />
<String>Sushil Font Time Roman </String>
<Font>
<FFamily value="Garamond" type="str" />
</Font>
<String>Sharma Font Garamond</String>
</ParaLine>
</Para>
to XML
<automatic-styles>
<style name="P1" family="paragraph">
<text-properties font-style="Regular" font-size="10.0" font-name="Times New Roman" />
</style>
<style name="T1" family="text">
<text-properties font-name="Garamond" />
</style>
</automatic-styles>
<texts>
<text style-name="P1">
Sushil Font Time Roman
<span style-name="T1">
Sharma Font Garamond
</span>
</text>
</texts>
There can be multiple Para in the input XML. so there will be multiple style as P1 , P2, P3 , T1, T2 etc
Thank you for your reply
