commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: [configuration] recursive inclusion of xml files with fileNames tag
Date Thu, 19 Apr 2012 20:09:45 GMT
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:
> <?xml version="1.0" encoding="UTF-8"?>
> <additional>
>          <xml fileName="other.xml" config-name="another"/>
> </additional>
>
> other.xml:
> <?xml version="1.0" encoding="UTF-8"?>
>   <xml fileName="other1.xml" config-name="another1"/>
> <xml fileName="other2.xml" config-name="another2"/>
> ...
>
> ?
>
> 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 <configuration> 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 <xml> tags to include files, make use of 
<configuration> 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


Mime
View raw message