I'm trying to determine the best approach for coding the following solution: I have an XML document coming in (which conforms to a particular DTD). I would like to validate the node values and return a report (XML transformed to HTML) to the users enumerating the errors found in the document. The validation falls into three categories - required fields, data type validation, and validation against a set of allowable values. Does anyone have a suggestion as to the best approach to the problem? Is a schema the way to go (and would validation against a schema produce a list of all nodes that failed?) or should I loop through the document using Java classes to perform the validation checks? Thanks in advance for any help!
Thanks for the input Balaji! After going through the tutorials and tracing through code to determine where the validation exceptions are thrown, I've decided that indeed the schema approach gives me too little control. So I've started working on an XSL solution. Thanks again!
author and deputy
Joined: Jul 13, 2001
Originally posted by Jen Again: So I've started working on an XSL solution. Thanks again!
Nice, Please share ur experience with us once you are through. Regards Balaji
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com