commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35753] New: - missing usefull functionality of XPath in org.apache.commons.configuration.HierarchicalConfiguration
Date Fri, 15 Jul 2005 12:03:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35753>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35753

           Summary: missing usefull functionality of XPath in
                    org.apache.commons.configuration.HierarchicalConfigurati
                    on
           Product: Commons
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: rzablocki@wp.pl


Hi,

I find out that there is missing very usefull functionality for 
org.apache.commons.configuration.HierarchicalConfiguration.

For instance, I have XML like below:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
	<Service name="contract.funds" class="my.MyClass">
		<ServiceParameters>
			<Param key="generate.request" value="true" />
			<Param key="request.xml.name" 
value="LifeFunds_REQ.xml" />
			<Param key="transform.response" value="true" />
			<Param key="reply.xml.name" 
value="dummy/LifeFunds_REP.xml" />
			<Param key="digester-rules.xml" 
value="LifeFunds_rules.xml" />
		</ServiceParameters>
	</Service>

	<Service name="contract.servicing.agents" class="my.MyClass">
		<ServiceParameters>
			<Param key="generate.request" value="true" />
			<Param key="request.xml.name" 
value="LifeServicingAgents_REQ.xml" />
			<Param key="transform.response" value="true" />
			<Param key="reply.xml.name" 
value="dummy/LifeServicingAgents_REP.xml" />
			<Param key="digester-rules.xml" 
value="LifeServicingAgents_rules.xml" />
		</ServiceParameters>
	</Service>

	<Service name="contract.additional.info" class="my.MyClass">
		<ServiceParameters>
			<Param key="generate.request" value="true" />
			<Param key="request.xml.name" 
value="LifeAdditionalInfo_REQ.xml" />
			<Param key="transform.response" value="true" />
			<Param key="reply.xml.name" 
value="dummy/LifeAdditionalInfo_REP.xml" />
			<Param key="digester-rules.xml" 
value="LifeAdditionalInfo_rules.xml" />
		</ServiceParameters>
	</Service>
</Configuration>

>From the application I would like to go directly to the configuration of 
service with name: "contract.funds" instead of reading whole hierarhi and check 
if the name is equals "contract.funds" I prefer to get its parameters like this:

config.getProperty("Service[@name='contract.funds']").ServiceParameters.Param)

instead of calling in a loop:

for(int i=0;;i++){
   if(config.getProperty("Service("+i+")[@name]").equals("contract.funds")){
// DO SOMETHING
   }
}

So in a simple words - it would be very helpfull if there will be full 
supoorted the XML Path Language (XPath) during requesting properties.

Best regards
Rafal

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message