Details
-
Bug
-
Status: Resolved
-
Resolution: Incomplete
-
2.2.0
-
None
-
None
-
Operating System: All
Platform: Other
-
13543
Description
Before parsing a valid xml document that contains a reference to a valid xsl
schema, I set the IgnoringElementContentWhitespace feature to true on the
DocumentBuilderFactory, but the resulting Document still contains the TEXT
Nodes containing whitespace. I was using jdk 1.4 and the latest
xercesImpl.jar. This is the sample code:
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
domFactory.setValidating(true);
domFactory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
domFactory.setIgnoringComments(true);
domFactory.setIgnoringElementContentWhitespace(true);
builder = domFactory.newDocumentBuilder();
Document doc = builder.parse(xml);