By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

How to use Parameter in XPATH Queris

P: 14
Hi,

Example XML:
<Data>
<Plan StartDate="2008-01-01" Age="65" Frequency="12" />
...
<Customer Id="1" DateOfBirth="1952-06-08" Sex="Female" Age="65" />
-------<Fund FundName="002-066" PctInvested="100" />

...
..
</Data>

plz check the below lines carefully
here in XML file I have more than one <Plan> & <Customer> Child nodes in <Data> (parant node)
----<Fund> is child node in <Customer> Node..

I need XPath: value of "FundName" Where Customer.Age = Plan.Age

I've XPath (1). "Data/Plan/Customer[@Age='/Plan/@Age']/Fund/@FundName"

but it not working...
(2) first need to find Plan.Age value then I've to use taht as parameter in XPath
like "Data/Plan/Customer[@Age='parameter']/Fund/@FundName

Plz send me XPath ASPS....
Ths,
Ajay
Jan 31 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.