commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Seiler <>
Subject Re: CSV parsing/writing?
Date Fri, 27 May 2005 15:50:22 GMT
On 09:43 Fri 27 May     , Don Seiler wrote:
> Anyway it would be the mechanism to reading/writing CSVRecord objects
> from/to the actual file.  The CSVRecord object would do the actual
> parsing/serializing for each line, given the parameters in its parent
> CSVFile.
> Obviously this is a very simplistic view of things.  I've not a great
> deal of experience dealing with events and listeners outside of swing.
> With DOM are we still talking about using the SAX setup and having
> everything go through XML at one point or another?  I see an example of
> a SAX/CSV parser at oreilly's website that sort of makes sense to me,
> but I may have to give it about 10 more reads to fully sink in.

Alright here goes.  I can just write my CSVFile class, let whatever user
apps add themselves as listeners to it.  The user apps then call parse
on that, CSVFile would then open the file and call functions on the
listeners, passing them an array of Strings (or other possible
selection) representing the values in that line.  User app can then do
whatever it wants it that data.

This setup on its own has nothing to do with DOM or XML, which I don't
believe it should.  If the client app wants to turn it into DOM/XML/JAXP
whatever they can then do that in their lineParsed() function (or
whatever its called) that CSVFile would call with the registered

Let me know if you think I've totaly misunderstood how to do this

Don Seiler

Public Key:
Fingerprint: 0B56 50D5 E91E 4D4C 83B7  207C 76AC 5DA2 FC87 F041

View raw message