Non validating dom parser
The default is false, but in most situations you should set this to true, especially if you’re just reading the document and are not going to write it back out again.CDATA sections should not be treated differently than any other text.
That is, the validation feature overrides the expand entity references feature.In other implementations it will be something else.Furthermore, since these classes do not share a common interface or superclass, the methods they use to parse documents vary too.For example, in Xerces, the two methods that read XML documents have these signatures: You may be wondering which parser this program actually uses. The answer depends on which parsers are installed in your class path and how certain system properties are set.The default is to use the class named by the has a number of options that allow you to determine exactly how the parsers it creates behave.The five predefined references— The following two methods determine whether the parsers produced by this factory will generate comment nodes for comments seen in the input document.
The default, false, means that comment nodes will be produced. False means include comments, and true means don’t include comments.
This confused me initially, and I was getting my poison pen all ready to write about the brain damage of throwing away comments although the spec required them to be included, when I realized that the method was in fact behaving like it should.) The following two methods determine whether the parsers produced by this factory will generate text nodes for so-called “ignorable white space”; that is, white space that occurs between tags where the DTD specifies that parsed character data cannot appear.
Most of the setter methods take a boolean that turns the feature on if true or off if false.
However, a couple of the features are defined as confusing double negatives, so read carefully.
These two methods determine whether CDATA sections are merged with text nodes or not.
If the coalescing feature is true, then the result tree will not contain any CDATA section nodes, even if the parsed XML document does contain CDATA sections.