Hi Clarence,

They are part of the same implementation. DocumentBuilderFactory creates
DocumentBuilders and the DocumentBuilder implementation in Xerces wraps a
DOMParser. Not sure what more you're expecting to get from DOMParser.
Arguably the DocumentBuilder has more capability (e.g.
setSchema(javax.xml.validation.Schema)) and you should generally be
obtaining it through the JAXP API, not by hardcoding to the implementation.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

"Ng, Clarence" <cla...@amazon.com> wrote on 12/11/2008 04:35:30 PM:

> Hi.
>
> We have been using the documentbuilderfactory interface, which
> defaults to java's implementation of dom parser (com.sun.org.apache.
> xerces.internal.jaxp.DocumentBuilderFactory). We are planning to
> upgrade it to xerces-j 2.8.1. However we found the interfaceImpl
> (org.apache.xerces.jaxp.DocumentBuilderFactory) insufficient for our
> needs, and would want to use Xerces' other implementation of the dom
> parser (org.apache.xerces.parsers.DOMParser).
> Problem is, we have a large amount of existing xml files stored and
> it is critical the parser behavior stays relatively constant through
> the upgrade, ie what validates should stay the same , as well as for
> those that didn?t.
> Question is, is there a different between the implementation of
> DOMParser vs DocumentBuilderFactory we should be aware of that might
> lead to difference in terms of xml validation?
>
> Thanks.
> Clarence Ng
>
> Thanks,
> Clarence Ng
> SDE : Content Management
> Website Application Platform

Reply via email to