Class DocumentBuilderFactoryImpl
java.lang.Object
javax.xml.parsers.DocumentBuilderFactory
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.
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);
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ConfigurationDeprecated.(package private) booleanDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Deprecated.Create a DocumentBuilderFactory to use a supplied Configuration -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) Deprecated.Allows the user to retrieve specific attributes on the underlying implementation.booleangetFeature(String name) Deprecated.Get the state of the named feature.booleanDeprecated.Get state of XInclude processing.Deprecated.Creates a new instance of aDocumentBuilderusing the currently configured parameters.voidsetAttribute(String name, Object value) Deprecated.Allows the user to set specific attributes on the underlying implementation.voidsetFeature(String name, boolean value) Deprecated.Set a feature for thisDocumentBuilderFactoryandDocumentBuilders created by this factory.voidsetXIncludeAware(boolean state) Deprecated.Set state of XInclude processing.Methods inherited from class DocumentBuilderFactory
getSchema, isCoalescing, isExpandEntityReferences, isIgnoringComments, isIgnoringElementContentWhitespace, isNamespaceAware, isValidating, newDefaultInstance, newDefaultNSInstance, newInstance, newInstance, newNSInstance, newNSInstance, setCoalescing, setExpandEntityReferences, setIgnoringComments, setIgnoringElementContentWhitespace, setNamespaceAware, setSchema, setValidating
-
Field Details
-
config
Configuration configDeprecated. -
xIncludeAware
boolean xIncludeAwareDeprecated.
-
-
Constructor Details
-
DocumentBuilderFactoryImpl
public DocumentBuilderFactoryImpl()Deprecated. -
DocumentBuilderFactoryImpl
Deprecated.Create a DocumentBuilderFactory to use a supplied Configuration- Parameters:
config- the supplied Configuration
-
-
Method Details
-
setAttribute
Deprecated.Allows the user to set specific attributes on the underlying implementation.- Specified by:
setAttributein classDocumentBuilderFactory- Parameters:
name- The name of the attribute. For Saxon this must be one of the names defined inFeatureKeysvalue- The value of the attribute.- Throws:
IllegalArgumentException- thrown if the underlying implementation doesn't recognize the attribute.
-
getAttribute
Deprecated.Allows the user to retrieve specific attributes on the underlying implementation.- Specified by:
getAttributein classDocumentBuilderFactory- Parameters:
name- The name of the attribute. For Saxon this must be one of the names defined inFeatureKeys- Returns:
- value The value of the attribute.
- Throws:
IllegalArgumentException- thrown if the underlying implementation doesn't recognize the attribute.
-
newDocumentBuilder
Deprecated.Creates a new instance of aDocumentBuilderusing the currently configured parameters.- Specified by:
newDocumentBuilderin classDocumentBuilderFactory- 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
Deprecated.Set a feature for this
Feature names are fully qualifiedDocumentBuilderFactoryandDocumentBuilders created by this factory.URIs. Implementations may define their own features. AnParserConfigurationExceptionis thrown if thisDocumentBuilderFactoryor theDocumentBuilders it creates cannot support the feature. It is possible for anDocumentBuilderFactoryto expose a feature value but be unable to change its state. All implementations are required to support theXMLConstants.FEATURE_SECURE_PROCESSINGfeature. When the feature is:-
true: the implementation will limit XML processing to conform to implementation limits. Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources. If XML processing is limited for security reasons, it will be reported via a call to the registeredErrorHandler.fatalError(org.xml.sax.SAXParseException exception). SeeDocumentBuilder.setErrorHandler(org.xml.sax.ErrorHandler errorHandler). -
false: the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
- Specified by:
setFeaturein classDocumentBuilderFactory- Parameters:
name- Feature name.value- Is feature statetrueorfalse.- Throws:
ParserConfigurationException- if thisDocumentBuilderFactoryor theDocumentBuilders it creates cannot support this feature.NullPointerException- If thenameparameter is null.
-
-
getFeature
Deprecated.Get the state of the named feature.
Feature names are fully qualifiedURIs. Implementations may define their own features. AnParserConfigurationExceptionis thrown if thisDocumentBuilderFactoryor theDocumentBuilders it creates cannot support the feature. It is possible for anDocumentBuilderFactoryto expose a feature value but be unable to change its state.- Specified by:
getFeaturein classDocumentBuilderFactory- Parameters:
name- Feature name.- Returns:
- State of the named feature.
- Throws:
ParserConfigurationException- if thisDocumentBuilderFactoryor theDocumentBuilders it creates cannot support this feature.
-
isXIncludeAware
public boolean isXIncludeAware()Deprecated.Get state of XInclude processing.
- Overrides:
isXIncludeAwarein classDocumentBuilderFactory- 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:
setXIncludeAwarein classDocumentBuilderFactory- Parameters:
state- Set XInclude processing totrueorfalse- Throws:
UnsupportedOperationException- For backward compatibility, when implementations for earlier versions of JAXP is used, this exception will be thrown.- Since:
- 1.5
-