commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Selg <alexander.sel...@gmail.com>
Subject [configuration] attributes in xml config don't apply to all entries of a list
Date Wed, 30 May 2012 14:53:37 GMT
Hi,

I'm using a different implementation of the DefaultExpressionEngine. I
use attributes in our applications conf.xml to filter the result of
DefaultExpressionEngine.query().
So I have a config file like

<configuration>
       <someStrings environment="test">str1,str2,str3</someStrings>
       <someStrings environment="prod">str4,str5,str6</someStrings>
</configuration>

In the query() methode of MyExpressionEngine I want to access these attributes

       List<ConfigurationNode> queryResults = super.query(root, key);
       for (ConfigurationNode queryResult : queryResults) {
           attributes = queryResult.getAttributes();
           ...
       }

The problem is that I only get the attributes for the first node - the
subsequent nodes don't have any attributes set.
So for "str1" I'll get the attribute environment="test", for "str2"
and "str3" I'll get no attributes.

Is that a bug?
Am I doing something wrong?

I'm using commons-configuration 1.8 with jdk1.6

Any help would be appreciated,
Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message