commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <mlybar...@gmail.com>
Subject Re: XMLProperty traversing
Date Thu, 05 May 2005 10:05:31 GMT
after reviewing the mailing lists, it doesn't seem that commons 
configuration xml configurator supports yet xpath like lookups. any news on 
the status? 

any thoughts on what it would take to implement?

it shouldn't be too hard as the XMLConfigurator has the ability to return 
w3c document.
On 5/5/05, Mark Lybarger <mlybarger@gmail.com> wrote:
> 
> I'm new to using the XMLConfiguration and the commons configuration in 
> general. i have an xml config file such as:
> 
> <system type="TEST">
> <url name="OutGoingURL">
> <value>http://outoging.test.url.com</value>
> <type>java.net.URL</type>
> </url>
> <url name="InBoundURL">
> <value>http://incoming.test.url.com</value>
> <type>java.net.URL</type>
> </url>
> </system>
> <system type="TEST2">
> <url name="OutGoingURL">
> <value>http://outoging.test.url.com</value>
> <type>java.net.URL</type>
> </url>
> <url name="InBoundURL">
> <value>http://incoming2.test.url.com</value>
> <type>java.net.URL</type>
> </url>
> </system>
> 
> in my application i define an environment variable "ENV" and give the 
> value of TEST or TEST2, etc. i'd like to be able to do something like 
> myConfiguration.getProperty ( 
> "//system/type='TEST'/url[@name='OutGoingURL']/value" );
> 
> i'm looking to manage internally some jndi url lookups since my app server 
> doesn't give me a clean way to configure these per physical app instance.
> 
> thanks!
> 
>

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