Top Description Fields Constructors Methods
com.ctc.wstx.sax

public Class WstxSAXParserFactory

extends SAXParserFactory
Class Inheritance
Imports
javax.xml.parsers.SAXParser, .SAXParserFactory, org.xml.sax.SAXNotRecognizedException, .SAXNotSupportedException, com.ctc.wstx.stax.WstxInputFactory

This is implementation of the main JAXP SAX factory, and as such acts as the entry point from JAXP.

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.

Field Summary

Modifier and TypeField and Description
protected boolean
mFeatNsPrefixes

Sax feature that determines whether namespace declarations need to be also reported as attributes or not.

protected final WstxInputFactory

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
getFeature(String
The name of the property to be retrieved.
name
)

Implements abstract javax.xml.parsers.SAXParserFactory.getFeature.

Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.

public SAXParser
newSAXParser()

Implements abstract javax.xml.parsers.SAXParserFactory.newSAXParser.

Creates a new instance of a SAXParser using the currently configured factory parameters.

public void
setFeature(String
The name of the feature to be set.
name
,
boolean
The value of the feature to be set.
value
)

Implements abstract javax.xml.parsers.SAXParserFactory.setFeature.

Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader.

Inherited from javax.xml.parsers.SAXParserFactory:
getSchemaisNamespaceAwareisValidatingisXIncludeAwarenewDefaultInstancenewDefaultNSInstancenewInstancenewInstancenewNSInstancenewNSInstancesetNamespaceAwaresetSchemasetValidatingsetXIncludeAware

Field Detail

mFeatNsPrefixesback to summary
protected boolean mFeatNsPrefixes

Sax feature that determines whether namespace declarations need to be also reported as attributes or not.

mStaxFactoryback to summary
protected final WstxInputFactory mStaxFactory

Constructor Detail

WstxSAXParserFactoryback to summary
public WstxSAXParserFactory()
Since
5.3
WstxSAXParserFactoryback to summary
public WstxSAXParserFactory(WstxInputFactory f)
Since
4.0.8

Method Detail

getFeatureback to summary
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException

Implements abstract javax.xml.parsers.SAXParserFactory.getFeature.

Doc from javax.xml.parsers.SAXParserFactory.getFeature.

Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.

Parameters
name:String

The name of the property to be retrieved.

Returns:boolean

Value of the requested property.

Annotations
@Override
Exceptions
SAXNotRecognizedException:
When the underlying XMLReader does not recognize the property name.
SAXNotSupportedException:
When the underlying XMLReader recognizes the property name but doesn't support the property.
newSAXParserback to summary
public SAXParser newSAXParser()

Implements abstract javax.xml.parsers.SAXParserFactory.newSAXParser.

Doc from javax.xml.parsers.SAXParserFactory.newSAXParser.

Creates a new instance of a SAXParser using the currently configured factory parameters.

Returns:SAXParser

A new instance of a SAXParser.

Annotations
@Override
setFeatureback to summary
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException

Implements abstract javax.xml.parsers.SAXParserFactory.setFeature.

Doc from javax.xml.parsers.SAXParserFactory.setFeature.

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 javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING feature. When the feature is

  • true: the implementation will limit XML processing to conform to implementation limits. Examples include entity 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 registered org.xml.sax.ErrorHandler#fatalError(SAXParseException exception). See SAXParser parse methods for handler specification.
  • When the feature is false, the implementation will processing XML according to the XML specifications without regard to possible implementation limits.
Parameters
name:String

The name of the feature to be set.

value:boolean

The value of the feature to be set.

Annotations
@Override
Exceptions
SAXNotRecognizedException:
When the underlying XMLReader does not recognize the property name.
SAXNotSupportedException:
When the underlying XMLReader recognizes the property name but doesn't support the property.