org.apache.commons.configuration
Class BaseConfigurationXMLReader
java.lang.Object
|
+--org.apache.commons.configuration.ConfigurationXMLReader
|
+--org.apache.commons.configuration.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 ContentHandler
at an instance
it is possible to perform XML processing on a configuration object.
- Version:
- $Id: BaseConfigurationXMLReader.java 155408 2005-02-26 12:56:39Z dirkv $
- Author:
- Oliver Heger
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseConfigurationXMLReader
public BaseConfigurationXMLReader()
- Creates a new instance of
BaseConfigurationXMLReader
.
BaseConfigurationXMLReader
public BaseConfigurationXMLReader(Configuration conf)
- Creates a new instance of
BaseConfigurationXMLReader
and
sets the configuration object to be parsed.
- Parameters:
conf
- the configuration to be parsed
getConfiguration
public Configuration getConfiguration()
- Returns 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()
- Returns the configuration to be processed.
- Overrides:
getParsedConfiguration
in class ConfigurationXMLReader
- Returns:
- the actual configuration
processKeys
protected void processKeys()
- The main SAX event generation method. This element uses an internal
HierarchicalConfigurationConverter
object to iterate over
all keys in the actual configuration and to generate corresponding SAX
events.
- Overrides:
processKeys
in class ConfigurationXMLReader
- Following copied from class:
org.apache.commons.configuration.ConfigurationXMLReader
- Throws:
IOException
- if an IO error occursSAXException
- if a SAX error occurs
Copyright © 2001-2005 The Apache Software Foundation. All Rights Reserved.