commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [Configuration] [Betwixt] Using both the configuration and bitwixt projects
Date Tue, 05 Oct 2004 21:27:19 GMT
Hi, you can't build an InputSource for betwix from a 
HierarchicalConfiguration in its current state. You could do it with an 
XMLConfiguration by using the toString() method though.

Emmanuel Bourg wrote:
> 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. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message