Hi All, Can you give me a suggession to convert Comma Seperated Value (CSV) text file to XML file. I have to convert the CSV to XML and display the XML file in the front end using XSL. Using javaservlet and xsl. Please help me with coding. Thank you Regards kumar.
Author and all-around good cowpoke
posted 15 years ago
You can parse a CSV line using a java.util.StringTokenizer - use the form that returns tokens so you can count the fields. Writing XML can be as simple as lots of println statements to a PrintWriter writing to a java.io.CharArrayWriter. Bill