thomas peter wrote:
hi,
i stumbled across the following issue, and don't know what knob to turn.
i load configs (xml) via the getConfiguration Method of
ConfigurationFactory and cast it to CombinedConfiguration.
the file i provide to the Factory is
<configuration>
<xml fileName="c.xml"/-->
</configuration>
c.xml has something like that:
<root>
<v type="one">
<some>blah</some>
<thing>bla</thing>
</v>
<v type="one">
<some>moreblah</some>
<thing>muchbla</thing>
</v>
<v type="two">
<some>different blah</some>
<thing>different blub</thing>
</v>
</root>
when i only include c.xml everything works fine, and i get 3 iterations
of the following for-loop:
for (int i=0;; i++){
if(!config.containsKey("v.("+i+")[EMAIL PROTECTED]")){
break;
}
}
and i can access all three v-nodes (and their children)
but if i include another xml-file via
<configuration>
<xml fileName="c.xml"/>
<xml fileName="c-additional.xml"/>
</configuration>
while c-additional.xml only holds
<v type="something">
<some>asdf</some>
<thing>asd</thing>
</v>
the first occurence of <v type="one"> node has been merged with all
other nodes that are named <v type="one">
is this inteded behaviour?
can i switch it off?
i know there is the <additional> tag for the main-condig.
but my nodes are in the same file.
any hints?
thanx in advance,
thomas
Not sure what happens here, but a combined configuration certainly does
no merging based on attribute values. What exactly is the output of the
loop? Did you try what happens if you use the <additional> tag?
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]