Note
most of the SAX features are not configurable as of yet. However, effort is made to recognize all existing standard features and properties, to allow using code to figure out existing capabilities automatically.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final InputFactoryImpl |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | getFeature(String
The name of the property to be retrieved. name)Implements abstract javax. |
| public static SAXParserFactory | newInstance()
Hides javax. SAXParserFactory.
|
| public SAXParser | newSAXParser()
Implements abstract javax. |
| public void | setFeature(String
The name of the feature to be set. name, boolean The value of the feature to be set. enabled)Implements abstract javax. |
| public void | setNamespaceAware(boolean
true if the parser produced by this code will
provide support for XML namespaces; false otherwise. awareness)Overrides javax. |
| public void | setValidating(boolean
true if the parser produced by this code will
validate documents as they are parsed; false otherwise. value)
Specifies that the parser produced by this code will
validate documents as they are parsed.
|
| mStaxFactory | back to summary |
|---|---|
| pack-priv final InputFactoryImpl mStaxFactory | |
| SAXParserFactoryImpl | back to summary |
|---|---|
| public SAXParserFactoryImpl() | |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException Implements abstract javax. Doc from javax. Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.
| |
| newInstance | back to summary |
|---|---|
| public static SAXParserFactory newInstance() Hides javax. Doc from javax. 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 ....
| |
| newSAXParser | back to summary |
|---|---|
| public SAXParser newSAXParser() Implements abstract javax. Doc from javax. Creates a new instance of a SAXParser using the currently configured factory parameters. | |
| setFeature | back to summary |
|---|---|
| public void setFeature(String name, boolean enabled) throws SAXNotRecognizedException, SAXNotSupportedException Implements abstract javax. Doc from javax. 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) Overrides javax. Doc from javax. Specifies that the parser produced by this code will
provide support for XML namespaces. By default the value of this is set
to
| |
| setValidating | back to summary |
|---|---|
| public void setValidating(boolean value) Overrides javax. Doc from javax. 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
| |