commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borut Bolčina <>
Subject Re: [configuration]how i get the index
Date Wed, 12 Apr 2006 07:50:56 GMT

I did not find the time yet to test 1.3-dev, but I have a question. If 
have a configuration.xml such as

    <?xml version="1.0" encoding="ISO-8859-1" ?>
      <properties fileName=""/>
      <properties fileName=""/>
      <properties fileName=""/>
      <xml fileName="cow.xml"/>
      <xml fileName="chicken.xml"/>

then I find these lines in my code:

    public static CompositeConfiguration config;

    // WARNING - must be 3rd entry in configuration.xml
    Configuration propertyConfiguration = config.getConfiguration(2);

Will there be a way to get propertyConfiguration (or xmlConfiguration or 
even (!) databaseConfiguration) out of configuartion.xml _by some id_ 
and _not by index_? I don't want my application stop working just 
becouse someone changed the order of elements in configuration.xml.


On 11.4.2006 16:14, Oliver Heger wrote:
> Borut Bolčina wrote:
>> Oliver, that is great news! I'll check out the latest version to play
>> with. What is the release plan?
> It would be great if somebody could test these new features. So far we
> have not got any feedback.
> A new release has not been discussed yet. Don't know about the other
> committers, but I have some things on my list I would like to finish
> before a new version. This is especially the re-design of the
> ConfigurationFactory class. I started with an alternative implementation
> (called DefaultConfigurationBuilder), which is quite functional ATM, but
> some things are missing.
> Oliver
>> -Borut
>> On 30.3.2006 15:52, Oliver Heger wrote:
>>> Since the 1.2 release development has continued. The current version
>>> in SVN now supports so called "expression engines", which allow to
>>> plug in different query languages. There is also an XPATH expression
>>> engine, which can be used for querying properties in XPATH syntax.
>>> With this you can write something like that:
>>> String firstUsrField = config.getString(
>>>   "/database/tables[@name='users']/fields/field[1]/name");
>>> or use other features provided by XPATH to navigate through your
>>> configuration. The user guide (in the SVN version) was updated to
>>> cover these new facilities.
>>> Oliver
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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