Methods Summary |
---|
public abstract boolean | getFeature(java.lang.String name)Queries a feature from the underlying implementation.
|
public boolean | isNamespaceAware()Queries whether the factory is configured to deliver parsers that are
namespace-aware.
return namespaceAware;
|
public boolean | isValidating()Queries whether the factory is configured to deliver parsers that are
validating.
return validating;
|
public boolean | isXIncludeAware()Queries whether the factory is configured to deliver parsers that are
XInclude-aware.
throw new UnsupportedOperationException();
|
public static javax.xml.parsers.SAXParserFactory | newInstance()Creates a new {@code SAXParserFactory} that can be configured and then be
used for creating {@link SAXParser} objects. The method first checks the
value of the {@code SAXParserFactory} property. If this
is non-{@code null}, it is assumed to be the name of a class that serves
as the factory. The class is instantiated, and the instance is returned.
If the property value is {@code null}, the system's default factory
implementation is returned.
// TODO Properties file and META-INF case missing here. See spec.
String factory = System
.getProperty("javax.xml.parsers.SAXParserFactory");
if (factory != null) {
try {
return (SAXParserFactory) Class.forName(factory).newInstance();
} catch (Exception ex) {
throw new FactoryConfigurationError(factory);
}
}
try {
return new SAXParserFactoryImpl();
} catch (Exception ex) {
// Ignore.
}
throw new FactoryConfigurationError("Cannot create SAXParserFactory");
|
public abstract javax.xml.parsers.SAXParser | newSAXParser()Creates a new {@link SAXParser} that matches the current configuration of
the factory.
|
public abstract void | setFeature(java.lang.String name, boolean value)Sets a feature in the underlying implementation.
|
public void | setNamespaceAware(boolean value)Determines whether the factory is configured to deliver parsers that are
namespace-aware.
namespaceAware = value;
|
public void | setValidating(boolean value)Determines whether the factory is configured to deliver parsers that are
validating.
validating = value;
|
public void | setXIncludeAware(boolean value)Determines whether the factory is configured to deliver parsers that are
XInclude-aware.
throw new UnsupportedOperationException();
|