| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private boolean | namespaceAware
Should Parsers be namespace aware? |
| private boolean | validating
Should Parsers be validating? |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: Value of the requested property.The name of the property to be retrieved. name)Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader. |
| public Schema | Returns: theSchema object that was last set through
the setSchema(Schema) method, or null
if the method was not invoked since a SAXParserFactory
is created.Gets the |
| public boolean | Returns: true if the factory is configured to produce parsers which are namespace aware; false otherwise.Indicates whether or not the factory is configured to produce parsers which are namespace aware. |
| public boolean | Returns: true if the factory is configured to produce parsers which validate the XML content during parse; false otherwise.Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse. |
| public boolean | |
| private static SAXParserFactory | |
| public static SAXParserFactory | Returns: A new instance of theSAXParserFactory builtin
system-default implementation.Creates a new instance of the |
| public static SAXParserFactory | Returns: a new instance of theSAXParserFactory builtin
system-default implementation.Creates a new NamespaceAware instance of the |
| public static SAXParserFactory | Returns: A new instance of a SAXParserFactory.Obtains a new instance of a |
| public static SAXParserFactory | Returns: New instance of aSAXParserFactoryfully qualified factory class name that provides implementation of factoryClassName, ClassLoader javax.xml.parsers.SAXParserFactory.ClassLoader used to load the factory class. If null
current Thread's context classLoader is used to load the factory class.Obtain a new instance of a |
| public static SAXParserFactory | Returns: a new instance of theSAXParserFactoryCreates a new NamespaceAware instance of a |
| public static SAXParserFactory | Returns: a new instance of theSAXParserFactorya fully qualified factory class name that provides
implementation of
factoryClassName, ClassLoader javax.xml.parsers.SAXParserFactory.the classLoader)ClassLoader used to load the factory class.
If it is null, the current Thread's
context classLoader is used to load the factory class.Creates a new NamespaceAware instance of a |
| public abstract SAXParser | Returns: A new instance of a SAXParser.Creates a new instance of a SAXParser using the currently configured factory parameters. |
| public abstract void | setFeature(String
The name of the feature to be set. name, boolean The value of the feature to be set. value)Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. |
| public void | setNamespaceAware(boolean
true if the parser produced by this code will
provide support for XML namespaces; false otherwise. awareness)Specifies that the parser produced by this code will provide support for XML namespaces. |
| public void | |
| public void | setValidating(boolean
true if the parser produced by this code will
validate documents as they are parsed; false otherwise. validating)Specifies that the parser produced by this code will validate documents as they are parsed. |
| public void | setXIncludeAware(final boolean
Set XInclude processing to state)true or
falseSet state of XInclude processing. |
| DEFAULT_IMPL | back to summary |
|---|---|
| private static final String DEFAULT_IMPL | |
| namespaceAware | back to summary |
|---|---|
| private boolean namespaceAware Should Parsers be namespace aware? | |
| validating | back to summary |
|---|---|
| private boolean validating Should Parsers be validating? | |
| SAXParserFactory | back to summary |
|---|---|
| protected SAXParserFactory() Protected constructor to force use of | |
| getFeature | back to summary |
|---|---|
| public abstract boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.
| |
| getSchema | back to summary |
|---|---|
| public Schema getSchema() Gets the
| |
| isNamespaceAware | back to summary |
|---|---|
| public boolean isNamespaceAware() Indicates whether or not the factory is configured to produce parsers which are namespace aware.
| |
| isValidating | back to summary |
|---|---|
| public boolean isValidating() Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
| |
| isXIncludeAware | back to summary |
|---|---|
| public boolean isXIncludeAware() Get state of XInclude processing.
| |
| makeNSAware | back to summary |
|---|---|
| private static SAXParserFactory makeNSAware(SAXParserFactory spf) | |
| newDefaultInstance | back to summary |
|---|---|
| public static SAXParserFactory newDefaultInstance() Creates a new instance of the
| |
| newDefaultNSInstance | back to summary |
|---|---|
| public static SAXParserFactory newDefaultNSInstance() Creates a new NamespaceAware instance of the Implementation Specification In addition to creating a factory instance using the same process as
| |
| newInstance | back to summary |
|---|---|
| public static SAXParserFactory newInstance() Obtains a new instance of a
Once an application has obtained a reference to a
Tip for Trouble-shooting
Setting the
If you have problems loading java -Djaxp.debug=1 YourProgram ....
| |
| newInstance | back to summary |
|---|---|
| public static SAXParserFactory newInstance(String factoryClassName, ClassLoader classLoader) Obtain a new instance of a Once an application has obtained a reference to a Tip for Trouble-shootingSetting the If you have problems, try: java -Djaxp.debug=1 YourProgram ....
| |
| newNSInstance | back to summary |
|---|---|
| public static SAXParserFactory newNSInstance() Creates a new NamespaceAware instance of a Implementation Specification In addition to creating a factory instance using the same process as
| |
| newNSInstance | back to summary |
|---|---|
| public static SAXParserFactory newNSInstance(String factoryClassName, ClassLoader classLoader) Creates a new NamespaceAware instance of a Implementation Specification In addition to creating a factory instance using the same process as
| |
| newSAXParser | back to summary |
|---|---|
| public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXException Creates a new instance of a SAXParser using the currently configured factory parameters.
| |
| setFeature | back to summary |
|---|---|
| public abstract void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. A list of the core features and properties can be found at http://www.saxproject.org/ All implementations are required to support the
| |
| setNamespaceAware | back to summary |
|---|---|
| public void setNamespaceAware(boolean awareness) Specifies that the parser produced by this code will
provide support for XML namespaces. By default the value of this is set
to
| |
| setSchema | back to summary |
|---|---|
| public void setSchema(Schema schema) Set the When a When warnings/errors/fatal errors are found by the validator, the parser must
handle them as if those errors were found by the parser itself.
In other words, if the user-specified A validator may modify the SAX event stream (for example by adding default values that were missing in documents), and a parser is responsible to make sure that the application will receive those modified event stream. Initially, This processing will take effect even if
the It is an error to use
the Note for implementors
A parser must be able to work with any
| |
| setValidating | back to summary |
|---|---|
| public void setValidating(boolean validating) Specifies that the parser produced by this code will
validate documents as they are parsed. By default the value of this is
set to Note that "the validation" here means a validating parser as defined in the XML recommendation. In other words, it essentially just controls the DTD validation. (except the legacy two properties defined in JAXP 1.2.)
To use modern schema languages such as W3C XML Schema or
RELAX NG instead of DTD, you can configure your parser to be
a non-validating parser by leaving the
| |
| setXIncludeAware | back to summary |
|---|---|
| public void setXIncludeAware(final boolean state) 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
| |