I am trying to convert an XML to JSON using XSLT. Following are my XML and XSLT code.
XML file:
Only write the comma if there is another cd element in your xml.
cd
So basically you have to wrap that comma in a xsl:if statement like this: ,
xsl:if
,
So your stylesheet will look something like that:
{ "catalog":[ {"title":" ", "artist":" "}, ] }