com.icl.saxon.om

Class DocumentBuilderFactoryImpl

public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory

Implementation of JAXP 1.3 DocumentBuilderFactory. To build a Document using Saxon, set the system property javax.xml.parsers.DocumentBuilderFactory to "com.icl.saxon.om.DocumentBuilderFactoryImpl" and then call DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(InputSource);
Constructor Summary
DocumentBuilderFactoryImpl()
Method Summary
ObjectgetAttribute(String name)
booleangetFeature(String name)

Get the state of the named feature.

Feature names are fully qualified java.net.URIs.

DocumentBuildernewDocumentBuilder()
voidsetAttribute(String name, Object value)
voidsetFeature(String name, boolean value)

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

Feature names are fully qualified java.net.URIs.

Constructor Detail

DocumentBuilderFactoryImpl

public DocumentBuilderFactoryImpl()

Method Detail

getAttribute

public Object getAttribute(String name)

getFeature

public boolean getFeature(String name)

Get the state of the named feature.

Feature names are fully qualified java.net.URIs. Implementations may define their own features. An javax.xml.parsers.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.

The Saxon implementation always throws this exception.

newDocumentBuilder

public DocumentBuilder newDocumentBuilder()

setAttribute

public void setAttribute(String name, Object value)

setFeature

public void setFeature(String name, boolean value)

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

Feature names are fully qualified java.net.URIs. Implementations may define their own features. An javax.xml.parsers.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 javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING feature. When the feature is:

The Saxon implementation does not support the secure processing feature.

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. NullPointerException If the name parameter is null.