Monday, 24 November 2014

ExtJs 4 - Convert JS object to xml



Im using ExtJs 4.2.1.


Is there an "easy" way to convert JS object to xml? I mean a simple function like:



Ext.JSON.encode(object);


To convert object to Json.


Lets say the following object for example:



Root:
Child1
Child2
Child3


To the following xml:



<Root>
<Child1> some value </Child1>
<Child2> some value </Child2>
<Child3> some value </Child3>
</Root>


I was trying to search it in the documentation, but didn't came to any solution like that.


Thanks.


No comments:

Post a Comment