i once wrote something about this problem, but hadn't had the time to
get back to this until now.
so here is an example:
------------<test.xml>---------------
<root>
<a>
<b>a</b>
<b>b</b>
<b>c</b>
</a>
<a>
<b>A</b>
<b>B</b>
<b>C</b>
<b>D</b>
</a>
</root>
------------</test.xml>---------------
------------<test2.xml>---------------
<root>
<a>
<b>1</b>
<b>2</b>
<b>3</b>
</a>
<a>
<b>I</b>
<b>II</b>
<b>III</b>
<b>IV</b>
</a>
</root>
------------</test2.xml>---------------
------------<config.xml>---------------
<configuration>
<additional>
<xml fileName="test.xml" />
<xml fileName="test2.xml" />
</additional>
</configuration>
------------</config.xml>---------------
and the java-code:
ConfigurationFactory factory = new ConfigurationFactory("config.xml");
Configuration conf=null;
try {
conf = factory.getConfiguration();
} catch (ConfigurationException e) {} catch(SecurityException secE){}
for (int i=0;; i++){
if(!conf.containsKey("a.b("+i+")")){
break;
}
System.out.println(conf.getString("a.b("+i+")"));
}
this outputs:
1
2
3
IV
i'm sure i'm dooing something wrong, when i want to access every node
and get a result like
1
2
3
I
II
III
IV
a
b
c
A
B
C
D
what's wrong in my understanding?
thank you in advance.
cheers,
thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]