Hi Everybody,
How can I disable XML validation in
java 5 parser? It simply does not work...
This is my code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
factory.setAttribute("http://xml.org/sax/features/validation",Boolean.FALSE); factory.setAttribute("http://apache.org/xml/features/nonvalidating/load-external-dtd",Boolean.FALSE);
DocumentBuilder builder = factory.newDocumentBuilder();
Thanks,
Maciej