net.sf.saxon.dom
Class DocumentBuilderFactoryImpl

java.lang.Object
  extended by javax.xml.parsers.DocumentBuilderFactory
      extended by net.sf.saxon.dom.DocumentBuilderFactoryImpl

Deprecated. since 9.3. The DOM created by this class is a DOM wrapper around (typically) a Saxon Tiny Tree. There is little point in constructing such an object. If the tree is primarily for use by Saxon XSLT and XQuery, it is better to construct a Tiny Tree directly and omit the DOM wrapper; if it is primarily for other DOM applications, it is better to construct a fully- functional DOM using (for example) Apache Xerces.

public class DocumentBuilderFactoryImpl
extends 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()
          Deprecated.  
DocumentBuilderFactoryImpl(Configuration config)
          Deprecated. Create a DocumentBuilderFactory to use a supplied Configuration
 
Method Summary
 Object getAttribute(String name)
          Deprecated. Allows the user to retrieve specific attributes on the underlying implementation.
 boolean getFeature(String name)
          Deprecated. Get the state of the named feature.
 boolean isXIncludeAware()
          Deprecated. Get state of XInclude processing.
 DocumentBuilder newDocumentBuilder()
          Deprecated. Creates a new instance of a DocumentBuilder using the currently configured parameters.
 void setAttribute(String name, Object value)
          Deprecated. Allows the user to set specific attributes on the underlying implementation.
 void setFeature(String name, boolean value)
          Deprecated. Set a feature for this DocumentBuilderFactory and DocumentBuilders created by this factory.
 void setXIncludeAware(boolean state)
          Deprecated. Set state of XInclude processing.
 
Methods inherited from class javax.xml.parsers.DocumentBuilderFactory
getSchema, isCoalescing, isExpandEntityReferences, isIgnoringComments, isIgnoringElementContentWhitespace, isNamespaceAware, isValidating, newInstance, newInstance, setCoalescing, setExpandEntityReferences, setIgnoringComments, setIgnoringElementContentWhitespace, setNamespaceAware, setSchema, setValidating
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentBuilderFactoryImpl

public DocumentBuilderFactoryImpl()
Deprecated. 

DocumentBuilderFactoryImpl

public DocumentBuilderFactoryImpl(Configuration config)
Deprecated. 
Create a DocumentBuilderFactory to use a supplied Configuration

Parameters:
config - the supplied Configuration
Method Detail

setAttribute

public void setAttribute(String name,
                         Object value)
Deprecated. 
Allows the user to set specific attributes on the underlying implementation.

Specified by:
setAttribute in class DocumentBuilderFactory
Parameters:
name - The name of the attribute. For Saxon this must be one of the names defined in FeatureKeys
value - The value of the attribute.
Throws:
IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.

getAttribute

public Object getAttribute(String name)
Deprecated. 
Allows the user to retrieve specific attributes on the underlying implementation.

Specified by:
getAttribute in class DocumentBuilderFactory
Parameters:
name - The name of the attribute. For Saxon this must be one of the names defined in FeatureKeys
Returns:
value The value of the attribute.
Throws:
IllegalArgumentException - thrown if the underlying implementation doesn't recognize the attribute.

newDocumentBuilder

public DocumentBuilder newDocumentBuilder()
                                   throws ParserConfigurationException
Deprecated. 
Creates a new instance of a DocumentBuilder using the currently configured parameters.

Specified by:
newDocumentBuilder in class DocumentBuilderFactory
Returns:
A new instance of a DocumentBuilder. For Saxon the returned DocumentBuilder will be an instance of DocumentBuilderImpl
Throws:
ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.

setFeature

public void setFeature(String name,
                       boolean value)
                throws ParserConfigurationException
Deprecated. 

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:

Specified by:
setFeature in class DocumentBuilderFactory
Parameters:
name - Feature name.
value - Is feature state true or false.
Throws:
ParserConfigurationException - if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support this feature.
NullPointerException - If the name parameter is null.

getFeature

public boolean getFeature(String name)
                   throws ParserConfigurationException
Deprecated. 

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.

Specified by:
getFeature in class DocumentBuilderFactory
Parameters:
name - Feature name.
Returns:
State of the named feature.
Throws:
ParserConfigurationException - if this DocumentBuilderFactory or the DocumentBuilders it creates cannot support this feature.

isXIncludeAware

public boolean isXIncludeAware()
Deprecated. 

Get state of XInclude processing.

Overrides:
isXIncludeAware in class DocumentBuilderFactory
Returns:
current state of XInclude processing
Throws:
UnsupportedOperationException - For backward compatibility, when implementations for earlier versions of JAXP is used, this exception will be thrown.
Since:
1.5

setXIncludeAware

public void setXIncludeAware(boolean state)
Deprecated. 

Set state of XInclude processing.

If XInclude markup is found in the document instance, should it be processed as specified in XML Inclusions (XInclude) Version 1.0.

XInclude processing defaults to false.

Overrides:
setXIncludeAware in class DocumentBuilderFactory
Parameters:
state - Set XInclude processing to true or false
Throws:
UnsupportedOperationException - For backward compatibility, when implementations for earlier versions of JAXP is used, this exception will be thrown.
Since:
1.5


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.