commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Migowski" <chrismf...@gmail.com>
Subject Re: commons-configuration XMLConfiguration get attributes with XPathExpressionEngine
Date Wed, 27 Feb 2008 07:17:53 GMT
Hi Oliver,

2008/2/26, Oliver Heger oliver.heger@oliver-heger.de:


> The code:
> >  XMLConfiguration config = new XMLConfiguration("simple.xml");
> >  config.setReloadingStrategy(new FileChangedReloadingStrategy());
> >  config.setExpressionEngine(new XPathExpressionEngine());
> >  List x = config.getList("/Pool[@id]");
> >
> >
> >
> > x ist always empty... I would assume it to contain three elements
> "eins",
> > "zwei" & "drei". What am I doing/thinking wrong?
>
> Did you try
> List x = config.getList("/Pool/@id"); ?
>
> Something like this works in the unit tests.
>
> Oliver


 That worked. Thanks a lot!
best regards,
christian!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message