i have an XML generated in the below form from JSON to XML Conversion.
<entry>
<string>dataset_code</string>
<string>GDP</string>
</entry>
How to convert this into the below format in XML?
<entry>
<dataset_code>GDP</dataset_code>
</entry>
Note: Here the key-value pairs(dataset_code, GDP, entry) are dynamic.
Any help on this would be highly appreciated!
In XSLT, this would be done as:
Note that this can easily fail if the first string is not a valid XML element name.
I'm not an expert but playing with http://www.freeformatter.com/xsl-transformer.html I've found this solution:
Hope it helps