I guess, you've got two options:

1) You could hack the recent CSV parser from Jeff Painter which returns
key/value pairs, and use '\t' instead of ','.

2) You could use the recent StrictParser that I submitted, subclass the
sucker and roll a Map into it. Initialise with StrictParser(string,'\t') (
read: super(arg,'\t') ) instead of StrictParser(string,',').

3) Introduce a third alternative that makes everybody magically happy.

In essence a TSV is a '\t' instead of a ',' correct?

As should be obvious already, depending on your requirements one of the
approaches will work better than the other. 

-Greg

> -----Original Message-----
> From: rickchev [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 12 November 2003 8:55 a.m.
> To: [EMAIL PROTECTED]
> Subject: TSVParser utility
> 
> All,
> 
> I have a need parse a TSV file and generate a name/value pair of the file
> contents.  In searching the web I found the turbine TSVParser utility
> class.
> If I just want to utilize the class, how should I go about it? Is
> downloading the entire turbine.jar too much to utilize just the one class
> or
> is there a better way?
> 
> Thanks for any advice.
> 
> Rick Chevalier
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to