Hi,
I need to parse a fixed length text file and then do the data validation on it. File can contain 100+ records.
Data validation for each record will typically have:
1) Numeric check, min/max value check, decimal precision check etc.
2) Date check
3) currency code is same in all the amount fields in the record.
4) couple of fields will be validated from the database too...
File level validation:
1)sequence number are in order in the file for each record.
2)seq of record should be header, data --- data , trailer... then again header, data... data, trailer and then finally end.
Whenever there is an error in a field for a record i need to store the error message for the field... and then finally display all the errors for each field in each record rendering an html page.
What can be the a good approach to attack this problem?
I came across an article but very old.
http://www.javaworld.com/javaworld/jw-09-2000/jw-0908-validation.html http://www.javaworld.com/javaworld/jw-10-2000/jw-1013-validation2.html http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-validation3.html http://www.javaworld.com/javaworld/jw-12-2000/jw-1208-validation4.html?page=1 I am not sure whether that validation method still good. I am not allowed to use open source utilities.
Is there a way so that i create an XSD and then validate a XML and capture all the errors and not just to check whether the XML is valid or not. I need field level error capturing.
Any help is appreciated.
Thanks and regards,
Karan
[ July 16, 2007: Message edited by: Karan Jain ]