Im trying to convert xml data to CSV. How do I add COMMA as data/text in CSV?
I couldn't use COMMA as separator since CSV is comma delimited file. Please help me to generate data as below:
rowId data
1 [xValue,yValue,zValue]
2 [xValue,yValue,zValue]
Some sample data:
<parent>
<c1>
<c2 x=1 y=2 z=3>
</c2>
</c1>
</parent>
My present xsl extracting the xml data is : Adding a COMMA as separator or text is delimiting the data in file. Please suggest the right way.
<xsl:for-each select="childlevel1/childlevel2">
<xsl:value-of select="concat('','[')"/>
<xsl:value-of select="@x"/>
<xsl:value-of select="@y"/>
<xsl:value-of select="@z"/>
<xsl:value-of select="concat(']','')"/>
</xsl:for-each>