I have received a csv file content as string. Now I want to split the string so that I can get the individual record and start processing.
To split the recod I have used String.split("\n")
I have tried with StringTokenizer st=new StringTokenizer("\n")
Both are not giving the desired result?
Any help in this?
why not use built in service pub.string:tokenize - this itself is a java service.
Review the Flat File Schema Developer’s Guide. IS has facilities to parse the file for you and return records to your service for processing. No need to split/tokenize yourself.
You can use flatfile schema to convert CSV file to a Document.
Use pub.flatFile:convertToValues and specify the flatfile schema.
Here’s a link which explains the flat file conversion if you haven’t done it before.