Top Description Fields Constructors Methods
org.springframework.util.xml

pack-priv abstract Class AbstractXMLReader

extends Object
implements XMLReader
Class Inheritance
All Implemented Interfaces
org.xml.sax.XMLReader
Known Direct Subclasses
org.springframework.util.xml.AbstractStaxXMLReader
Imports
org.xml.sax.ContentHandler, .DTDHandler, .EntityResolver, .ErrorHandler, .SAXNotRecognizedException, .SAXNotSupportedException, .XMLReader, org.xml.sax.ext.LexicalHandler, org.springframework.lang.Nullable

Abstract base class for SAX XMLReader implementations. Contains properties as defined in XMLReader, and does not recognize any features.
Authors
Arjen Poutsma, Juergen Hoeller
Since
3.0
See Also
setContentHandler(org.xml.sax.ContentHandler), setDTDHandler(org.xml.sax.DTDHandler), setEntityResolver(org.xml.sax.EntityResolver), setErrorHandler(org.xml.sax.ErrorHandler)

Field Summary

Modifier and TypeField and Description
private ContentHandler
private DTDHandler
private EntityResolver
private ErrorHandler
private LexicalHandler

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ContentHandler
getContentHandler()

Implements org.xml.sax.XMLReader.getContentHandler.

Return the current content handler.
public DTDHandler
getDTDHandler()

Implements org.xml.sax.XMLReader.getDTDHandler.

Return the current DTD handler.
public EntityResolver
getEntityResolver()

Implements org.xml.sax.XMLReader.getEntityResolver.

Return the current entity resolver.
public ErrorHandler
getErrorHandler()

Implements org.xml.sax.XMLReader.getErrorHandler.

Return the current error handler.
public boolean
getFeature(String
The feature name, which is a fully-qualified URI.
name
)

Implements org.xml.sax.XMLReader.getFeature.

This implementation throws a SAXNotRecognizedException exception for any feature outside the "http://xml.org/sax/features/" namespace and returns false for any feature within.
protected LexicalHandler
public Object
getProperty(String
The property name, which is a fully-qualified URI.
name
)

Implements org.xml.sax.XMLReader.getProperty.

Throws a SAXNotRecognizedException exception when the given property does not signify a lexical handler.
public void
setContentHandler(ContentHandler
The content handler.
contentHandler
)

Implements org.xml.sax.XMLReader.setContentHandler.

Allow an application to register a content event handler.
public void
setDTDHandler(DTDHandler
The DTD handler.
dtdHandler
)

Implements org.xml.sax.XMLReader.setDTDHandler.

Allow an application to register a DTD event handler.
public void
setEntityResolver(EntityResolver
The entity resolver.
entityResolver
)

Implements org.xml.sax.XMLReader.setEntityResolver.

Allow an application to register an entity resolver.
public void
setErrorHandler(ErrorHandler
The error handler.
errorHandler
)

Implements org.xml.sax.XMLReader.setErrorHandler.

Allow an application to register an error event handler.
public void
setFeature(String
The feature name, which is a fully-qualified URI.
name
,
boolean
The requested value of the feature (true or false).
value
)

Implements org.xml.sax.XMLReader.setFeature.

This implementation throws a SAXNotRecognizedException exception for any feature outside the "http://xml.org/sax/features/" namespace and accepts a false value for any feature within.
public void
setProperty(String
The property name, which is a fully-qualified URI.
name
,
Object
The requested value for the property.
value
)

Implements org.xml.sax.XMLReader.setProperty.

Throws a SAXNotRecognizedException exception when the given property does not signify a lexical handler.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentHandlerback to summary
private ContentHandler contentHandler
Annotations
@Nullable
dtdHandlerback to summary
private DTDHandler dtdHandler
Annotations
@Nullable
entityResolverback to summary
private EntityResolver entityResolver
Annotations
@Nullable
errorHandlerback to summary
private ErrorHandler errorHandler
Annotations
@Nullable
lexicalHandlerback to summary
private LexicalHandler lexicalHandler
Annotations
@Nullable

Constructor Detail

AbstractXMLReaderback to summary
pack-priv AbstractXMLReader()

Method Detail

getContentHandlerback to summary
public ContentHandler getContentHandler()

Implements org.xml.sax.XMLReader.getContentHandler.

Doc from org.xml.sax.XMLReader.getContentHandler.

Return the current content handler.

Returns:ContentHandler

The current content handler, or null if none has been registered.

Annotations
@Override
@Nullable
getDTDHandlerback to summary
public DTDHandler getDTDHandler()

Implements org.xml.sax.XMLReader.getDTDHandler.

Doc from org.xml.sax.XMLReader.getDTDHandler.

Return the current DTD handler.

Returns:DTDHandler

The current DTD handler, or null if none has been registered.

Annotations
@Override
@Nullable
getEntityResolverback to summary
public EntityResolver getEntityResolver()

Implements org.xml.sax.XMLReader.getEntityResolver.

Doc from org.xml.sax.XMLReader.getEntityResolver.

Return the current entity resolver.

Returns:EntityResolver

The current entity resolver, or null if none has been registered.

Annotations
@Override
@Nullable
getErrorHandlerback to summary
public ErrorHandler getErrorHandler()

Implements org.xml.sax.XMLReader.getErrorHandler.

Doc from org.xml.sax.XMLReader.getErrorHandler.

Return the current error handler.

Returns:ErrorHandler

The current error handler, or null if none has been registered.

Annotations
@Override
@Nullable
getFeatureback to summary
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException

Implements org.xml.sax.XMLReader.getFeature.

This implementation throws a SAXNotRecognizedException exception for any feature outside the "http://xml.org/sax/features/" namespace and returns false for any feature within.

Parameters
name:String

Doc from org.xml.sax.XMLReader.getFeature.

The feature name, which is a fully-qualified URI.

Returns:boolean

Doc from org.xml.sax.XMLReader.getFeature.

The current value of the feature (true or false).

Annotations
@Override
Exceptions
SAXNotRecognizedException:

Doc from org.xml.sax.XMLReader.getFeature.

If the feature value can't be assigned or retrieved.

SAXNotSupportedException:

Doc from org.xml.sax.XMLReader.getFeature.

When the XMLReader recognizes the feature name but cannot determine its value at this time.

getLexicalHandlerback to summary
protected LexicalHandler getLexicalHandler()
Annotations
@Nullable
getPropertyback to summary
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException

Implements org.xml.sax.XMLReader.getProperty.

Throws a SAXNotRecognizedException exception when the given property does not signify a lexical handler. The property name for a lexical handler is http://xml.org/sax/properties/lexical-handler.

Parameters
name:String

Doc from org.xml.sax.XMLReader.getProperty.

The property name, which is a fully-qualified URI.

Returns:Object

Doc from org.xml.sax.XMLReader.getProperty.

The current value of the property.

Annotations
@Override
@Nullable
Exceptions
SAXNotRecognizedException:

Doc from org.xml.sax.XMLReader.getProperty.

If the property value can't be assigned or retrieved.

SAXNotSupportedException:

Doc from org.xml.sax.XMLReader.getProperty.

When the XMLReader recognizes the property name but cannot determine its value at this time.

setContentHandlerback to summary
public void setContentHandler(ContentHandler contentHandler)

Implements org.xml.sax.XMLReader.setContentHandler.

Doc from org.xml.sax.XMLReader.setContentHandler.

Allow an application to register a content event handler.

If the application does not register a content handler, all content events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters
contentHandler:ContentHandler

The content handler.

Annotations
@Override
setDTDHandlerback to summary
public void setDTDHandler(DTDHandler dtdHandler)

Implements org.xml.sax.XMLReader.setDTDHandler.

Doc from org.xml.sax.XMLReader.setDTDHandler.

Allow an application to register a DTD event handler.

If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters
dtdHandler:DTDHandler

The DTD handler.

Annotations
@Override
setEntityResolverback to summary
public void setEntityResolver(EntityResolver entityResolver)

Implements org.xml.sax.XMLReader.setEntityResolver.

Doc from org.xml.sax.XMLReader.setEntityResolver.

Allow an application to register an entity resolver.

If the application does not register an entity resolver, the XMLReader will perform its own default resolution.

Applications may register a new or different resolver in the middle of a parse, and the SAX parser must begin using the new resolver immediately.

Parameters
entityResolver:EntityResolver

The entity resolver.

Annotations
@Override
setErrorHandlerback to summary
public void setErrorHandler(ErrorHandler errorHandler)

Implements org.xml.sax.XMLReader.setErrorHandler.

Doc from org.xml.sax.XMLReader.setErrorHandler.

Allow an application to register an error event handler.

If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.

Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

Parameters
errorHandler:ErrorHandler

The error handler.

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

Implements org.xml.sax.XMLReader.setFeature.

This implementation throws a SAXNotRecognizedException exception for any feature outside the "http://xml.org/sax/features/" namespace and accepts a false value for any feature within.

Parameters
name:String

Doc from org.xml.sax.XMLReader.setFeature.

The feature name, which is a fully-qualified URI.

value:boolean

Doc from org.xml.sax.XMLReader.setFeature.

The requested value of the feature (true or false).

Annotations
@Override
Exceptions
SAXNotRecognizedException:

Doc from org.xml.sax.XMLReader.setFeature.

If the feature value can't be assigned or retrieved.

SAXNotSupportedException:

Doc from org.xml.sax.XMLReader.setFeature.

When the XMLReader recognizes the feature name but cannot set the requested value.

setPropertyback to summary
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException

Implements org.xml.sax.XMLReader.setProperty.

Throws a SAXNotRecognizedException exception when the given property does not signify a lexical handler. The property name for a lexical handler is http://xml.org/sax/properties/lexical-handler.

Parameters
name:String

Doc from org.xml.sax.XMLReader.setProperty.

The property name, which is a fully-qualified URI.

value:Object

Doc from org.xml.sax.XMLReader.setProperty.

The requested value for the property.

Annotations
@Override
Exceptions
SAXNotRecognizedException:

Doc from org.xml.sax.XMLReader.setProperty.

If the property value can't be assigned or retrieved.

SAXNotSupportedException:

Doc from org.xml.sax.XMLReader.setProperty.

When the XMLReader recognizes the property name but cannot set the requested value.