Hi Everybody,How can I alter XML validation in java 5 parser? It simply does not work...
This is my label:DocumentBuilderFactory factory = DocumentBuilderFactory newInstance();factory setValidating(false);factory setIgnoringComments(adjust);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();
If you are trying to prevent the parser from processing a related DTD you can't do it that way. Parsers undergo to affect DTDs because they provide several functions besides validation. (Entity expansion is one there are others.)
I do not need DTD to analyse XML. It is just checking if XML i change by reversal and my label disables parsing for 100% but for dom4j or j4dom - can't bequeath... Only this JDK parser is strange..... Pretty create was also not working using normal properties but I already found a workaroundRegards,Maciej
Forex Groups - Tips on Trading
Related article:
http://forum.java.sun.com/thread.jspa?threadID=5215944
comments | Add comment | Report as Spam
|