Link to home
Start Free TrialLog in
Avatar of KenTan85
KenTan85

asked on

Transform flat xml to structure xml again

Hi,

i have another flat xml file as an input, and needs to transform it into a structure xml.

How do i do that, without messing up the sequence of the content

Thanks
Input:
 
<content>
<para1>This is a libel action</para1>
<para2>When the Exco received the Requisition</para2>
<para1>I held that there was no reason to grant an extension</para1>
<Quote1>This Quite 1 to be in para 1</Quote1>
<QuoteList1>This is quotelist to be in para as well</QuoteList1>
<para2>For the foregoing reasons</para2>
<para3>para 3 content</para3>
<para3>para 3 content</para3>
<para3>para 3 content</para3>
<para2>Para 2 content</para2>
<para1>Para 1 again</para1>
<QuoteList1>This is quotelist to be in para as well</QuoteList1>
<Quote1>This Quite 1 to be in para 1</Quote1>
</content>
 
output:
<content>
<para1>This is a libel action
    <para2>When the Exco received the Requisition</para2>
</para1>
 
<para1>I held that there was no reason to grant an extension
    <Quote1>This Quite 1 to be in para 1</Quote1>
    <QuoteList1>This is quotelist to be in para as well</QuoteList1>
    <para2>For the foregoing reasons
         <para3>para 3 content</para3>
         <para3>para 3 content</para3>
         <para3>para 3 content</para3>
    </para2>
    <para2>Para 2 content</para2>
</para1>
 
<para1>Para 1 again
    <QuoteList1>This is quotelist to be in para as well</QuoteList1>
    <Quote1>This Quite 1 to be in para 1</Quote1>
</para1>
</content>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KenTan85
KenTan85

ASKER

Hi Gertone,

Thanks alot...