commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: [configuration] How to read an INI Configuration with brackets as list separator
Date Tue, 25 Aug 2015 15:33:49 GMT
On 25.08.15 07:55, Patrick Brunmayr wrote:
> Hello
> 
> How can i read a configuration like that ?
> 
> [RESPONSE]
> code = 200
> description = Command completed successfully
> queuetime = 0
> runtime = 0.006
> property[count][0] = 164
> property[domain][0] = xxx
> property[domain][1] = xxx
> property[domain][2] = xxx
> 

Hi Patrick,

list separators are for values, not keys. See the JavaDoc for
HierarchicalINIConfiguration for a way to handle files like this. You
may want to check out the section
http://commons.apache.org/proper/commons-configuration/userguide_v1.10/howto_xml.html#Accessing_structured_properties
of the users guide for possibilities to access your data. Using the
XPathExpressionEngine might cover your case but that's just a wild guess.

HTH
Bye, Thomas.


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


Mime
View raw message