Documentbuilderfactory validating

26 Apr

The table(s) below shows the weaknesses and high level categories that are related to this weakness.

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.

The default is false; that is, include text nodes for ignorable white space.

JAXP allows you to set and get these custom features as objects of the appropriate type using these two methods: The naming conventions for both attribute names and values depends on the underlying parser. JAXP only works for Java, and it is a Sun proprietary standard.

Consequently, the W3C DOM working group is preparing an alternative cross-vendor means of parsing an XML document with a DOM parser. DOM3 is not close to a finished recommendation at the time of this writing and is not yet implemented by any parsers, but I can show you pretty much what the interface is likely to look like.