I'm trying to create some xml using python and DOM.
the structure is:
item.createNode('one/two', {
'three' :{
'four' :{ [k for k in somelist],
},
},
)
the out put is:
<one>
<two>
<three>
<four>item1</four>
<four>item2</four>
<four>item3</four>
</three>
</two>
</one>
now i want it to be this way:
<one>
<two>
<three>
<four>item1</four>
</three>
<three>
<four>item2</four>
</three>
<three>
<four>item3</four>
</three>
</two>
<one>
How can I make it happen?
Anybody knows?
the structure is:
item.createNode('one/two', {
'three' :{
'four' :{ [k for k in somelist],
},
},
)
the out put is:
<one>
<two>
<three>
<four>item1</four>
<four>item2</four>
<four>item3</four>
</three>
</two>
</one>
now i want it to be this way:
<one>
<two>
<three>
<four>item1</four>
</three>
<three>
<four>item2</four>
</three>
<three>
<four>item3</four>
</three>
</two>
<one>
How can I make it happen?
Anybody knows?