xsl-list
[Top] [All Lists]

Re: CSV to XML

2005-09-09 06:46:16
Hi Arthur,

In Java there is a Xerces sample that does exactly this, see CSVParser and CSVConfiguration from:
http://xml.apache.org/xerces2-j/samples-xni.html

I posted also an XSLT 2.0 stylesheet that currently handles tab delimited files but can be very easily changed to handle CSV files:
http://www.oxygenxml.com/forum/ftopic977.html

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Arthur Maloney wrote:
Hello xsl-list,


   Prior to transform, I would like to convert some CSV files to XML

  e.g.
  row 1: fieldName1,fieldName2,fieldName3,...
  ...
  row n: fred,67.8,I love XSLT2.0,...

  does anybody have any example code for converting to an XML file

  e.g or as attributes
  <CsvFileName>
     <fieldName1>...</fieldName1>
     ...
  </CsvFileName>
Ideally C# but Java will do.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>