I have to do the transformation using xsl to generate arrays,objects,strings of json.. I am failing to produce the arrays.. Actually my requirement is I have to transform the XML to JXML and JXML to json.. I have the generalized xslt for jxml to json..Now I need the generalized solution for converting XMLto JXML.. For reference I am producing sample xml's.. IP
<planexml>
<def/>
<xyz>
<Number>123</Number>
<name>sen</name>
<c>
<type/>
</c>
<c>
<type/>
</c>
<e>
<wsx/>
</e>
<e>
<wsx/>
</e>
</xyz>
<xyz>
<Number>123</Number>
<name>sen</name>
<c>
<type/>
</c>
<c>
<type/>
</c>
<e>
<wsx/>
</e>
<e>
<wsx/>
</e>
</xyz>
<planexml>
Result should be
<json:object xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx">
<json:object name="planexml">
<json:string name="def"/>
<json:array name="xyz">
<json:object>
<json:string name="number"/>
<json:string name="name"/>
<json:array name="c">
<json:object>
<json:string name="type"/>
</json:object>
<json:object>
<json:string name="type"/>
</json:object>
</json:array>
<json:array name="e">
<json:object>
<json:string name="wsx"/>
</json:object>
<json:object>
<json:string name="wsx"/>
</json:object>
</json:array>
</json:object>
<json:object>
<json:string name="number"/>
<json:string name="name"/>
<json:array name="c">
<json:object>
<json:string name="type"/>
</json:object>
<json:object>
<json:string name="type"/>
</json:object>
</json:array>
<json:array name="e">
<json:object>
<json:string name="wsx"/>
</json:object>
<json:object>
<json:string name="wsx"/>
</json:object>
</json:array>
</json:object>
</json:array>
</json:object>
</json:object>
Need the solution asap.. :(