Bean definition reader for XML bean definitions.
Delegates the actual XML document reading to an implementation
of the
BeanDefinitionDocumentReader interface.
setDocumentReaderClass(Class documentReaderClass) Specify the BeanDefinitionDocumentReader implementation to use,
responsible for the actual reading of the XML bean definition document.
setErrorHandler(ErrorHandler errorHandler) Set an implementation of the org.xml.sax.ErrorHandler
interface for custom handling of XML parsing errors and warnings.
Create new XmlBeanDefinitionReader for the given bean factory.
Parameters: beanFactory - the BeanFactory to load bean definitions into,in the form of a BeanDefinitionRegistry
Create the
XmlReaderContext to pass over to the document reader.
detectValidationMode
protected int detectValidationMode(Resource resource)(Code)
Detects which kind of validation to perform on the XML file identified
by the supplied
Resource . If the
file has a DOCTYPE definition then DTD validation is used
otherwise XSD validation is assumed.
Actually load bean definitions from the specified XML file.
Parameters: inputSource - the SAX InputSource to read from Parameters: resource - the resource descriptor for the XML file the number of bean definitions found throws: BeanDefinitionStoreException - in case of loading or parsing errors
Load bean definitions from the specified XML file.
Parameters: resource - the resource descriptor for the XML file the number of bean definitions found throws: BeanDefinitionStoreException - in case of loading or parsing errors
Load bean definitions from the specified XML file.
Parameters: encodedResource - the resource descriptor for the XML file,allowing to specify an encoding to use for parsing the file the number of bean definitions found throws: BeanDefinitionStoreException - in case of loading or parsing errors
Load bean definitions from the specified XML file.
Parameters: inputSource - the SAX InputSource to read from the number of bean definitions found throws: BeanDefinitionStoreException - in case of loading or parsing errors
Load bean definitions from the specified XML file.
Parameters: inputSource - the SAX InputSource to read from Parameters: resourceDescription - a description of the resource(can be null or empty) the number of bean definitions found throws: BeanDefinitionStoreException - in case of loading or parsing errors
Set a SAX entity resolver to be used for parsing. By default,
BeansDtdResolver will be used. Can be overridden for custom entity
resolution, for example relative to some specific base path.
See Also:BeansDtdResolver
Set an implementation of the org.xml.sax.ErrorHandler
interface for custom handling of XML parsing errors and warnings.
If not set, a default SimpleSaxErrorHandler is used that simply
logs warnings using the logger instance of the view class,
and rethrows errors to discontinue the XML transformation.
See Also:SimpleSaxErrorHandler
Specify which
ReaderEventListener to use. Default implementation is
EmptyReaderEventListener which discards every event notification. External tools
can provide an alternative implementation to monitor the components being registered
in the BeanFactory.
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware)(Code)
Set whether or not the XML parser should be XML namespace aware.
Default is "false".
Specify the
SourceExtractor to use. The default implementation is
NullSourceExtractor which simply returns null as the source object.
This means that during normal runtime execution no additional source metadata is attached
to the bean configuration metadata.
setValidating
public void setValidating(boolean validating)(Code)