x2js is great! But, facing the below issues... can you provide solution for it?
<tree>
<node1>
textTextText
<subnode1> text1 </subnode1>
<subnode2> text2 </subnode2>
</node1>
</tree>
when doing xml to json
{
"tree": {
"node1": {
"subnode1": "text1",
"subnode2": "text2",
"__text": "textTextText"
}
}
}
- And 'json to xml'
<tree>
<node1>
<subnode1>text1</subnode1>
<subnode2>text2</subnode2>
textTextText
</node1>
</tree>
As you can see, the text nodes are pushed to last when reconverting.