commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <mlybar...@gmail.com>
Subject XMLProperty traversing
Date Thu, 05 May 2005 08:10:09 GMT
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