However, I'm having trouble figuring out how to turn that validation off. Http Input Stream(Http URLConnection.java:1195) at org.apache.xerces. XMLEntity Manager.setup Current Entity(XMLEntity Manager.java:677) at org.apache.xerces. As such, I don't want to do any validation against DTD's or other schemas referenced in the doc.I have Document Builder Factory factory = Document Builder Instance(); Validating(false); final Document Builder b = Document Builder(); final Input Source s = new Input Source(new String Reader(str)); org.w3 Socket Exception: Unexpected end of file from server at Http Client.parse HTTPHeader(Http Client.java:774) at XMLEntity Manager.start Entity(XMLEntity Manager.java:1315) at org.apache.xerces. XMLEntity Manager.start DTDEntity(XMLEntity Manager.java:1282) at org.apache.xerces. XMLDTDScanner Input Source(XMLDTDScanner Impl.java:283) at org.apache.xerces. XMLDocument Scanner Impl$DTDDriver.dispatch(XMLDocument Scanner Impl.java:1194) at org.apache.xerces.

XMLDocument Scanner Impl$Prolog Driver.next(XMLDocument Scanner Impl.java:1003) at org.apache.xerces.

XMLDocument Scanner Impl.next(XMLDocument Scanner Impl.java:648) at org.apache.xerces.

XMLDocument Fragment Scanner Document(XMLDocument Fragment Scanner Impl.java:511) at org.apache.xerces.internal.parsers.

by Deepak Vohra 09/15/2004 An XML schema defines the structure of the elements and attributes in an XML document.

For an XML document to be valid based on an XML schema, the XML document has to be validated against the XML schema.

This tutorial explains the procedure of validating an XML document with an XML schema.To validate an XML document with the Xerces2-j parser, the Xerces2-j classes need to be in the classpath.The Xerces2-j parser may be obtained from the Xerces2-j page.Extract the Xerces-J-bin.2.5.0(for Windows) or Xerces-J-bin.2.5.0gz (for Unix) files to the installation directory of your choice.Add private class Validator extends Default Handler { public boolean validation Error = false; public SAXParse Exception sax Parse Exception = null; public void error(SAXParse Exception exception) throws SAXException { validation Error = true; sax Parse Exception = exception; } public void fatal Error(SAXParse Exception exception) throws SAXException { validation Error = true; sax Parse Exception=exception; } public void warning(SAXParse Exception exception) throws SAXException { } }Attribute( " Language", " Attribute( " Source", Schema Url);, using the JAXP parser.For an XML document to be based on an XML schema, the XML document is required to be validated with the schema.