On a java application using XML, some tests must be performed with the XML validation disabled in order to ensure that the java parts behave correctly if they face incorrect data. We also need it in order to check older methods (written more than 10 years ago).
I tried to locate every occurence of a SAXParserFactory and use
setValidation(false);
on it, in order to disable the validation. Unfortunately, I keep getting errors like the one linked below.
I have been playing arround with this for a while now, and can't relate to similar cases like this. The elements triggering the exception are similar to this :
Exception=org.xml.sax.SAXException, cvc-complex-type.4=Attribute 'date' must appear on element 'XXXXXXXXX'
Any ideas on the proper way to disable the validation correctly ?
Thanks for reading.