Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSV TO XML CONVERSION

Status
Not open for further replies.

rk03

IS-IT--Management
Apr 8, 2005
4
US
Hi,
I have a CSV FILE
<ROOT>
"81","344","0143857003","3072143","2","XUC","ABC,DBE","dhf"
"81","344","0151564171","2914659","2","XYC","ABC,DEF","dsd"
</ROOT>

Now I am using a XSLT file to transform this data into XML from CSV. The issue is in case of "ABC,DBE" it is looking for the next comma and parsing DBE as the next field ( or data) so all the elements have data pushed down by 1
Can this be helped/
my XSLT for tyhis field looks like this
</xsl:when>
<xsl:when test ="$FieldNum = 6">
<DJF>
<xsl:value-of select ="substring-before($StringToTransform,',')"/>
</DJF>
</xsl:when>

Please help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top