Daniel, this looks fine, but I suspect you may run into problems if you have variable
length CSV rows (i.e. with multiple line items as with the quickstart you added). Perhaps
this isn't an issue for you in the real world.
This has prompted me with an idea however... The EdiSax parser is like the CSVParser in
that it converts a non-xml stream (EDI stream) into a stream of SAX events, which are then
used to build a DOM (intermediate XML as you've called it). However, the EdiSax
parser is more powerful in that it can be configured to handle repeating segments etc
(i.e. variable length segments like the line-items). It can also be configured to handle
message formats with different delimiter types etc.
What I'm thinking is that it might be possible to use the EdiSax parser to parse CSV -
just configure the field delimiter to be "," and the segment delimiter to be
"& #10;" (linefeed).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041314#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...