Import text file crunching library for Java/Groovy ?

Posted by devdude on Stack Overflow See other posts from Stack Overflow or by devdude
Published on 2010-05-15T02:27:36Z Indexed on 2010/05/15 2:34 UTC
Read the original article Hit count: 294

Filed under:
|
|
|
|

In a lot of real life implementations of applications we face the requirement to import some kind of (text) files. Usually we would implement some (hardcoded?) logic to validate the file (eg. proper header, proper number of delimiters, proper date/time value,etc.). Eventually also need to check for the existence of related data in a table (eg. value of field 1 in text file must have an entry in some basic data table).

While XML solves this (to some extend) with XSD and DTD, we end up hacking this again and again for proprietary text file formats.

Is there any library or framework that allows the creation of templates similar to the xsd approach ? This would make it way more flexible to react on file format changes or implement new formats.

Thanks for any hints

Sven

© Stack Overflow or respective owner

Related posts about import

Related posts about text