Class BaseConfigurationXMLReader
- java.lang.Object
-
- org.apache.commons.configuration2.ConfigurationXMLReader
-
- org.apache.commons.configuration2.BaseConfigurationXMLReader
-
- All Implemented Interfaces:
XMLReader
public class BaseConfigurationXMLReader extends ConfigurationXMLReader
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
ContentHandlerat an instance it is possible to perform XML processing on a configuration object.
-
-
Field Summary
-
Fields inherited from class org.apache.commons.configuration2.ConfigurationXMLReader
NS_URI
-
-
Constructor Summary
Constructors Constructor Description BaseConfigurationXMLReader()Creates a new instance ofBaseConfigurationXMLReader.BaseConfigurationXMLReader(Configuration conf)Creates a new instance ofBaseConfigurationXMLReaderand sets the configuration object to be parsed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationgetConfiguration()Gets the actual configuration to be processed.ConfigurationgetParsedConfiguration()Gets the configuration to be processed.protected voidprocessKeys()The main SAX event generation method.voidsetConfiguration(Configuration conf)Sets the configuration to be processed.-
Methods inherited from class org.apache.commons.configuration2.ConfigurationXMLReader
fireCharacters, fireElementEnd, fireElementStart, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getException, getFeature, getProperty, getRootName, parse, parse, parseConfiguration, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty, setRootName
-
-
-
-
Constructor Detail
-
BaseConfigurationXMLReader
public BaseConfigurationXMLReader()
Creates a new instance ofBaseConfigurationXMLReader.
-
BaseConfigurationXMLReader
public BaseConfigurationXMLReader(Configuration conf)
Creates a new instance ofBaseConfigurationXMLReaderand sets the configuration object to be parsed.- Parameters:
conf- the configuration to be parsed
-
-
Method Detail
-
getConfiguration
public Configuration getConfiguration()
Gets the actual configuration to be processed.- Returns:
- the actual configuration
-
setConfiguration
public void setConfiguration(Configuration conf)
Sets the configuration to be processed.- Parameters:
conf- the configuration
-
getParsedConfiguration
public Configuration getParsedConfiguration()
Gets the configuration to be processed.- Specified by:
getParsedConfigurationin classConfigurationXMLReader- Returns:
- the actual configuration
-
processKeys
protected void processKeys()
The main SAX event generation method. This element uses an internalHierarchicalConfigurationConverterobject to iterate over all keys in the actual configuration and to generate corresponding SAX events.- Specified by:
processKeysin classConfigurationXMLReader
-
-