commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From greg.g...@kodak.com
Subject [Configuration] [Betwixt] Using both the configuration and bitwixt projects
Date Mon, 04 Oct 2004 21:01:31 GMT
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. 





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message