Hi ,
I have data as below in a text file
{
'AAA' => {
'A1' => 'a1 comment',
'A2' => 'a2 comment'
},
'BBB' => {
'B1' => 'b1 comment'
},
'CCC' => {
'C1' => 'c1 comment',
'C2' => 'c2 comment',
'C3' => 'c3 comment'
'C4' => 'c4 cooment
},
'DDD' => {
'D1' => 'd1 comment'
}
}
I want to parse this into a new XML file, so the output should look something like below,
<struct>
<Table tName="AAA">
<column name="A1">
<columnComment>a1 comment</columnComment>
</column>
<column colName="A2">
<columnComment>a2 comment</columnComment>
</column>
</Table>
<Table tName="BBB">
<column colName="B1">
<columnComment>b1 comment</columnComment>
</column>
</Table>
</struct>
the command should be efficient and fast.
is it feasible to do this?