net.sf.saxon.dom
Class DocumentBuilderFactoryImpl

java.lang.Object
  extended byjavax.xml.parsers.DocumentBuilderFactory
      extended bynet.sf.saxon.dom.DocumentBuilderFactoryImpl

public class DocumentBuilderFactoryImpl
extends javax.xml.parsers.DocumentBuilderFactory

Implementation of JAXP 1.1 DocumentBuilderFactory. To build a Document using Saxon, set the system property javax.xml.parsers.DocumentBuilderFactory to "net.sf.saxon.om.DocumentBuilderFactoryImpl" and then call DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(InputSource);


Constructor Summary
DocumentBuilderFactoryImpl()
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
           
 boolean getFeature(java.lang.String name)
          Get the state of the named feature.
 javax.xml.parsers.DocumentBuilder newDocumentBuilder()
           
 void setAttribute(java.lang.String name, java.lang.Object value)
           
 void setFeature(java.lang.String name, boolean value)
          Set a feature for this DocumentBuilderFactory and DocumentBuilders created by this factory.
 
Methods inherited from class javax.xml.parsers.DocumentBuilderFactory
isCoalescing, isExpandEntityReferences, isIgnoringComments, isIgnoringElementContentWhitespace, isNamespaceAware, isValidating, newInstance, setCoalescing, setExpandEntityReferences, setIgnoringComments, setIgnoringElementContentWhitespace, setNamespaceAware, setValidating
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentBuilderFactoryImpl

public DocumentBuilderFactoryImpl()
Method Detail

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)

getAttribute

public java.lang.Object getAttribute(java.lang.String name)

newDocumentBuilder

public javax.xml.parsers.DocumentBuilder newDocumentBuilder()
                                                     throws javax.xml.parsers.ParserConfigurationException
Throws:
javax.xml.parsers.ParserConfigurationException

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
                throws javax.xml.parsers.ParserConfigurationException

Set a feature for this DocumentBuilderFactory and DocumentBuilders created by this factory.

Feature names are fully qualified URIs. Implementations may define their own features. An ParserConfigurationException is thrown if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support the feature. It is possible for an DocumentBuilderFactory to expose a feature value but be unable to change its state.

All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature. When the feature is:

Parameters:
name - Feature name.
value - Is feature state true or false.
Throws:
javax.xml.parsers.ParserConfigurationException - if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support this feature.
java.lang.NullPointerException - If the name parameter is null.

getFeature

public boolean getFeature(java.lang.String name)
                   throws javax.xml.parsers.ParserConfigurationException

Get the state of the named feature.

Feature names are fully qualified URIs. Implementations may define their own features. An ParserConfigurationException is thrown if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support the feature. It is possible for an DocumentBuilderFactory to expose a feature value but be unable to change its state.

Parameters:
name - Feature name.
Returns:
State of the named feature.
Throws:
javax.xml.parsers.ParserConfigurationException - if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support this feature.