Hi Oliver, Am 20.04.2012 08:59, schrieb Oliver Zemann: > Hi Oliver ;) > Thanks for your help. > > I tried it with the following code/config: > > public static void main(String[] args) { > CombinedConfiguration conf = null; > try { > DefaultConfigurationBuilder builder = new > DefaultConfigurationBuilder(new File("conf/conf.xml")); > > conf = builder.getConfiguration(true); > } catch (Exception ex) { > ex.printStackTrace(); > } > Iterator keys = conf.getKeys(); > } > > conf.xml: > > > > > > > > > > conf1.xml: > > > conf1 > > > > conf1extend.xml: > > > extended > > > but i get: > Caused by: org.apache.commons.configuration.ConfigurationRuntimeException: > No ConfigurationProvider registered for tag name > at org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationBeanFactory.createBean(DefaultConfigurationBuilder.java:1293) > at org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:336) > ... 14 more > > Its a simple string so i am sure this should work out of the box, > shouldnt it? I did not find any parameter like "datatype" which i > could pass to the config element. The problem is the element. The XML file included by the element can only contain elements declaring other configuration sources like or . (It must conform to the same format as supported by DefaultConfigurationBuilder.) If you want to give the included configuration a name, use this syntax: Oliver > > Thanks for your help. > > Oli > > Am 19. April 2012 22:09 schrieb Oliver Heger: >> Hi Oliver, >> >> Am 19.04.2012 16:05, schrieb Oliver Zemann: >> >>> Hi, >>> >>> just a short question: >>> is it possible to include recursive all xml files that are referenced >>> by any already included xml? >>> eg.: >>> >>> root.xml: >>> >>> >>> >>> >>> >>> other.xml: >>> >>> >>> >>> ... >>> >>> ? >>> >>> I tried it but they are simply ignored. Only the first recursion level >>> (other.xml) is handled, all elements in other1.xml other2.xml ... are >>> ignored. >>> Can i somewhere put a recursive flag to the configuration? >>> Thanks. >> >> >> IIUC, the element is the one you are looking for. You can >> use it in a configuration definition file processed by >> DefaultConfigurationBuilder to include another definition file. This works >> recursively. >> >> So rather than using tags to include files, make use of >> elements. More details can be found in the user's guide [1]. >> >> Oliver >> >> [1] >> http://commons.apache.org/configuration/userguide/howto_configurationbuilder.html#Configuration_definition_file_reference >> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>> For additional commands, e-mail: user-help@commons.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org