I have the JSON data something like below:
{
"#data": [
{
"nid": "814",
"type": "resource",
"language": "",
"uid": "125",
"status": "1",
"title": "title 1",
"description": "description 1",
"rating": "5",
"picture": ""
},
{
"nid": "814",
"type": "resource",
"language": "",
"uid": "125",
"status": "1",
"title": "title 2",
"description": "description 2",
"rating": "3.5",
"picture": ""
}
]
}
I need to build XML out of this something like below:
<node title="title 1" type="resource" rating="5">
<description>description 1</description>
</node>
<node title="title 2" type="resource" rating="3.5">
<description>description 2</description>
</node>
I don't want to deserialize the JSON data, but I need to fetch only few elements and build the XML object. Can anyone help me on this?