With Xerces, I am getting following Error:
Parsing error: Document is invalid: no grammar found.
Parsing error: Document root element "TXLife", must match DOCTYPE root "null".
I have resolved the issue by setting
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ACORD.org/Standards/Life/2 file:///C:/Users/Himanshuy/workspace/XMLUnit/TXLife2.26.00.xsd" xmlns="http://ACORD.org/Standards/Life/2"
But now SAXParser is giving incorrect validation error when I compare it with XMLSpy validation error. SAXParser is giving me:
Invalid content was found starting with element <element>
XMLSpy is telling me:
<element> is not allowed at this location under element <some_parent_element>
Here XMLSpy is correct.
How can I get the same result from Java Validation?