Need an xslt to convert xml into json.
I have a xml file which is having 3 attributes.
The value in the 3rd attribute is another xml file.
I need an xslt which can read the value of the 3rd attribute as another xml (not just a value) and can convert it into json format.
<?xml version="1.0"?>
<ResultSet>
<attribute1>123</attribute1>
<attribute2>456</attribute2>
<attribute3>
<?xml version="1.0"?> // Need this xml (i.e. value of third attribute) to be converted into Json
<NewResultSet>
<rowset>
<node1>111</node1>
<node2>222</node2>
</rowset>
<rowset>
<node1>333</node1>
<node2>444</node2>
</rowset>
</NewResultSet>
</attribute3>
</ResultSet>

Can you make it more clear the format of the input, and the exact format of the output, and something can be looked into. A JSON format currently means nothing to me but doesnt mean XSLT cant be made :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.