Package org.apache.commons.configuration
Class BaseConfigurationXMLReader
java.lang.Object
org.apache.commons.configuration.ConfigurationXMLReader
org.apache.commons.configuration.BaseConfigurationXMLReader
- All Implemented Interfaces:
XMLReader
A specialized SAX2 XML parser that processes configuration objects.
This class mimics to be a SAX compliant XML parser. It is able to iterate
over the keys in a configuration object and to generate corresponding SAX
events. By registering a ContentHandler
at an instance
it is possible to perform XML processing on a configuration object.
- Version:
- $Id: BaseConfigurationXMLReader.java 1206765 2011-11-27 16:46:11Z oheger $
- Author:
- Commons Configuration team
-
Field Summary
Fields inherited from class org.apache.commons.configuration.ConfigurationXMLReader
NS_URI
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofBaseConfigurationXMLReader
.Creates a new instance ofBaseConfigurationXMLReader
and sets the configuration object to be parsed. -
Method Summary
Modifier and TypeMethodDescriptionReturns the actual configuration to be processed.Returns the configuration to be processed.protected void
The main SAX event generation method.void
Sets the configuration to be processed.Methods inherited from class org.apache.commons.configuration.ConfigurationXMLReader
fireCharacters, fireElementEnd, fireElementStart, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getException, getFeature, getProperty, getRootName, parse, parse, parseConfiguration, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty, setRootName
-
Constructor Details
-
BaseConfigurationXMLReader
public BaseConfigurationXMLReader()Creates a new instance ofBaseConfigurationXMLReader
. -
BaseConfigurationXMLReader
Creates a new instance ofBaseConfigurationXMLReader
and sets the configuration object to be parsed.- Parameters:
conf
- the configuration to be parsed
-
-
Method Details
-
getConfiguration
Returns the actual configuration to be processed.- Returns:
- the actual configuration
-
setConfiguration
Sets the configuration to be processed.- Parameters:
conf
- the configuration
-
getParsedConfiguration
Returns the configuration to be processed.- Specified by:
getParsedConfiguration
in classConfigurationXMLReader
- Returns:
- the actual configuration
-
processKeys
The main SAX event generation method. This element uses an internalHierarchicalConfigurationConverter
object to iterate over all keys in the actual configuration and to generate corresponding SAX events.- Specified by:
processKeys
in classConfigurationXMLReader
-