Package com.icl.saxon.om
Class DocumentBuilderFactoryImpl
- java.lang.Object
-
- javax.xml.parsers.DocumentBuilderFactory
-
- com.icl.saxon.om.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
Constructors Constructor Description DocumentBuilderFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAttribute(String name)booleangetFeature(String name)Get the state of the named feature.DocumentBuildernewDocumentBuilder()voidsetAttribute(String name, Object value)voidsetFeature(String name, boolean value)Set a feature for thisDocumentBuilderFactoryandDocumentBuilders created by this factory.-
Methods inherited from class javax.xml.parsers.DocumentBuilderFactory
getSchema, isCoalescing, isExpandEntityReferences, isIgnoringComments, isIgnoringElementContentWhitespace, isNamespaceAware, isValidating, isXIncludeAware, newDefaultInstance, newInstance, newInstance, setCoalescing, setExpandEntityReferences, setIgnoringComments, setIgnoringElementContentWhitespace, setNamespaceAware, setSchema, setValidating, setXIncludeAware
-
-
-
-
Method Detail
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttributein classDocumentBuilderFactory
-
newDocumentBuilder
public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException
- Specified by:
newDocumentBuilderin classDocumentBuilderFactory- Throws:
ParserConfigurationException
-
setAttribute
public void setAttribute(String name, Object value)
- Specified by:
setAttributein classDocumentBuilderFactory
-
getFeature
public boolean getFeature(String name) throws ParserConfigurationException
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.The Saxon implementation always throws this exception.
-
setFeature
public void setFeature(String name, boolean value) throws ParserConfigurationException
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 enity 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.
The Saxon implementation does not support the secure processing feature.
- 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.
-
-
-