net.sf.saxon.dom
Class DocumentBuilderFactoryImpl
java.lang.Object
javax.xml.parsers.DocumentBuilderFactory
net.sf.saxon.dom.DocumentBuilderFactoryImpl
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);
Methods inherited from class javax.xml.parsers.DocumentBuilderFactory |
getSchema, isCoalescing, isExpandEntityReferences, isIgnoringComments, isIgnoringElementContentWhitespace, isNamespaceAware, isValidating, isXIncludeAware, newInstance, setCoalescing, setExpandEntityReferences, setIgnoringComments, setIgnoringElementContentWhitespace, setNamespaceAware, setSchema, setValidating, setXIncludeAware |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentBuilderFactoryImpl
public DocumentBuilderFactoryImpl()
setAttribute
public void setAttribute(String name,
Object value)
- Specified by:
setAttribute
in class DocumentBuilderFactory
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttribute
in class DocumentBuilderFactory
newDocumentBuilder
public DocumentBuilder newDocumentBuilder()
throws ParserConfigurationException
- Specified by:
newDocumentBuilder
in class DocumentBuilderFactory
- Throws:
ParserConfigurationException
setFeature
public void setFeature(String name,
boolean value)
throws ParserConfigurationException
Set a feature for this DocumentBuilderFactory
and DocumentBuilder
s created by this factory.
Feature names are fully qualified URI
s.
Implementations may define their own features.
An ParserConfigurationException
is thrown if this DocumentBuilderFactory
or the
DocumentBuilder
s 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 DocumentBuilder
s
it creates cannot support this feature.
NullPointerException
- If the name
parameter is null.
getFeature
public boolean getFeature(String name)
throws ParserConfigurationException
Get the state of the named feature.
Feature names are fully qualified URI
s.
Implementations may define their own features.
An ParserConfigurationException
is thrown if this DocumentBuilderFactory
or the
DocumentBuilder
s 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 DocumentBuilder
s it creates cannot support this feature.