All,
I'm using the Commons-Configuration Project in order to manage multiple
xml configuration files, using the CompositeConfiguration and
HierarchicalConfiguration classes:
ConfigurationFactory factory = new ConfigurationFactory();
URL configURL = getClass().getResource("/config.xml");
factory.setConfigurationURL(configURL);
CompositeConfiguration compositeConfiguration =
(CompositeConfiguration)
factory.getConfiguration();
HierarchicalConfiguration config = (HierarchicalConfiguration)
compositeConfiguration.getConfiguration(0);
My application will use the HierarchicalConfiguration Api to access some of the
contents of the configuration files. But I
also want to map some of the content of the configuration files to
JavaBean Objects using the Betwixt Project, in particular using the
BeanReader class.
When I use the BeanReader.parse API method I have to pass it a String or
InputSource, InputStream... Assuming that I already have a HierarchicalConfiguration
object, what should I do to be able to call the BeanReader.parse API
method?
Thanks for your help,
Greg.