Is there a better alternative to XSD for POJO validation?
Hi
I've been given an existing app to fix. It needs to read CSV files in (from various sources, all with different formats) and write the data out to another CSV file (this time in a stardard format)
Half way through this, there's an additional step for validation. It converts the input CSV data to XML, and runs it against an XSD. This provides a bit of validation, but I don't think it's anywhere nearly as powerful as iScreen or Commons Validator (although I don't know XSD very well). Finally the (slightly-validated) XML is converted back to (output) CSV data.
I think this step of converting the data to XML is a bit overkill for the quality of small amount of validation that it provides (and validation rules are likely to get more complex as time goes on). I'm very tempted to take out the XML-related code and just convert to the CSV data to POJOs and then use iScreen/Commons Validator to validate them.
What do people think? Is this a good idea?
Thanks