Package org.apache.commons.configuration
Class HierarchicalConfigurationXMLReader
- java.lang.Object
-
- org.apache.commons.configuration.ConfigurationXMLReader
-
- org.apache.commons.configuration.HierarchicalConfigurationXMLReader
-
- All Implemented Interfaces:
org.xml.sax.XMLReader
public class HierarchicalConfigurationXMLReader extends ConfigurationXMLReader
A specialized SAX2 XML parser that "parses" hierarchical configuration objects.
This class mimics to be a SAX conform XML parser. Instead of parsing XML documents it processes a
Configurationobject and generates SAX events for the single properties defined there. This enables the whole world of XML processing for configuration objects.The
HierarchicalConfigurationobject to be parsed can be specified using a constructor or thesetConfiguration()method. This object will be processed by theparse()methods. Note that these methods ignore their argument.- Version:
- $Id: HierarchicalConfigurationXMLReader.java 1209998 2011-12-03 20:31:16Z oheger $
- Author:
- Commons Configuration team
-
-
Field Summary
-
Fields inherited from class org.apache.commons.configuration.ConfigurationXMLReader
NS_URI
-
-
Constructor Summary
Constructors Constructor Description HierarchicalConfigurationXMLReader()Creates a new instance ofHierarchicalConfigurationXMLReader.HierarchicalConfigurationXMLReader(HierarchicalConfiguration config)Creates a new instance ofHierarchicalConfigurationXMLReaderand sets the configuration to be parsed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HierarchicalConfigurationgetConfiguration()Returns the configuration object to be parsed.ConfigurationgetParsedConfiguration()Returns the configuration object to be processed.protected voidprocessKeys()Processes the actual configuration object to generate SAX parsing events.voidsetConfiguration(HierarchicalConfiguration config)Sets the configuration object to be parsed.-
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 Detail
-
HierarchicalConfigurationXMLReader
public HierarchicalConfigurationXMLReader()
Creates a new instance ofHierarchicalConfigurationXMLReader.
-
HierarchicalConfigurationXMLReader
public HierarchicalConfigurationXMLReader(HierarchicalConfiguration config)
Creates a new instance ofHierarchicalConfigurationXMLReaderand sets the configuration to be parsed.- Parameters:
config- the configuration object
-
-
Method Detail
-
getConfiguration
public HierarchicalConfiguration getConfiguration()
Returns the configuration object to be parsed.- Returns:
- the configuration object to be parsed
-
setConfiguration
public void setConfiguration(HierarchicalConfiguration config)
Sets the configuration object to be parsed.- Parameters:
config- the configuration object to be parsed
-
getParsedConfiguration
public Configuration getParsedConfiguration()
Returns the configuration object to be processed.- Specified by:
getParsedConfigurationin classConfigurationXMLReader- Returns:
- the actual configuration object
-
processKeys
protected void processKeys()
Processes the actual configuration object to generate SAX parsing events.- Specified by:
processKeysin classConfigurationXMLReader
-
-