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 listeners. Let me know if you think I've totaly misunderstood how to do this properly. -- Don Seiler [EMAIL PROTECTED] Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFC87F041 Fingerprint: 0B56 50D5 E91E 4D4C 83B7 207C 76AC 5DA2 FC87 F041
pgpFGZUffh2jY.pgp
Description: PGP signature
