Class DocumentBuilderFactoryImpl
java.lang.Object
javax.xml.parsers.DocumentBuilderFactory
net.sf.saxon.dom.DocumentBuilderFactoryImpl
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) booleangetFeature(String name) Get the state of the named feature.voidsetAttribute(String name, Object value) voidsetFeature(String name, boolean value) Set a feature for thisDocumentBuilderFactoryandDocumentBuilders created by this factory.Methods inherited from class DocumentBuilderFactory
getSchema, isCoalescing, isExpandEntityReferences, isIgnoringComments, isIgnoringElementContentWhitespace, isNamespaceAware, isValidating, isXIncludeAware, newDefaultInstance, newDefaultNSInstance, newInstance, newInstance, newNSInstance, newNSInstance, setCoalescing, setExpandEntityReferences, setIgnoringComments, setIgnoringElementContentWhitespace, setNamespaceAware, setSchema, setValidating, setXIncludeAware
-
Constructor Details
-
DocumentBuilderFactoryImpl
public DocumentBuilderFactoryImpl()
-
-
Method Details
-
setAttribute
- Specified by:
setAttributein classDocumentBuilderFactory
-
getAttribute
- Specified by:
getAttributein classDocumentBuilderFactory
-
newDocumentBuilder
- Specified by:
newDocumentBuilderin classDocumentBuilderFactory- Throws:
ParserConfigurationException
-
setFeature
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
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.
-