Copied from the JavaDoc:

public static DocumentBuilderFactory newInstance()
Obtain a new instance of a DocumentBuilderFactory. This static method
creates a new factory instance. This method uses the following ordered
lookup procedure to determine the DocumentBuilderFactory implementation
class to load: 
1. Use the javax.xml.parsers.DocumentBuilderFactory system property. 
2. Use the properties file "lib/jaxp.properties" in the JRE directory.
This configuration file is in standard java.util.Properties format and
contains the fully qualified name of the implementation class with the
key being the system property defined above. 
3. Use the Services API (as detailed in the JAR specification), if
available, to determine the classname. The Services API will look for a
classname in the file
META-INF/services/javax.xml.parsers.DocumentBuilderFactory in jars
available to the runtime. 
4. Platform default DocumentBuilderFactory instance. 


Ususally, 3. will work just fine with the file comes in Xerces.jar. Just
make sure that both 1 and 2 are clear for 3 to make in effect. That
means you don't need to anything.

Li

-----Original Message-----
From: Edward Nesterov [mailto:[EMAIL PROTECTED]
Sent: Friday, July 20, 2001 3:55 PM
To: '[EMAIL PROTECTED]'
Subject: DocumentBuilderFactory implementation.


Hi everybody!
I am new to Xerces and have one ( stupid :) ) question:
    - Do I need to set System property
javax.xml.parsers.DocumentBuilderFactory  in order to lookup the
implementation class for DocumentBuilderFactory. I am trying to use
xerces1.4.1. If yes, please let me know what I have to use as value for
the a.m. property.

Example from Sun's jaxp1.1 spec:

-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Docume
ntBuilder-FactoryImpl



Thanks in advance.

Ed.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to