S
simonverona87
Hi,
I am a little rusty on using XPath - not having had used it in a couple of years
I have an xmldocument - coming from a restful web service and being processed in vb.net .
The xml resembles the following layout :-
<result>
<requests>
<request>
<form name="id">1234</form>
<form name="customer"> ABC </form>
</request>
<request>
<form name="id">1235 </form>
<form name="customer"> DEF</form>
</request>
....
....
</requests>
</result>
I want to be able to count how many requests there are for specific customers (perhaps more than one at once) and thought I could do this by using an xpath query to return a nodelist which selects the nodes which are of the "form" element with the "name" attribute equal to "customer" then limiting the nodesselected where the customer name is one of the customers im lookingford (eg ABC and DEF).
Once I have the nodelist ill be able to count the nodes in the result.
I just cant form the xpath query though! The closest ive got is /result/requests/request/form[@name='customer'] which selects all the customer nodes, but I cant work out how to then limit the nodes selected to be for only certain customers.....
Can anybody point me in the right direction?
Thanks
Simon
I am a little rusty on using XPath - not having had used it in a couple of years
I have an xmldocument - coming from a restful web service and being processed in vb.net .
The xml resembles the following layout :-
<result>
<requests>
<request>
<form name="id">1234</form>
<form name="customer"> ABC </form>
</request>
<request>
<form name="id">1235 </form>
<form name="customer"> DEF</form>
</request>
....
....
</requests>
</result>
I want to be able to count how many requests there are for specific customers (perhaps more than one at once) and thought I could do this by using an xpath query to return a nodelist which selects the nodes which are of the "form" element with the "name" attribute equal to "customer" then limiting the nodesselected where the customer name is one of the customers im lookingford (eg ABC and DEF).
Once I have the nodelist ill be able to count the nodes in the result.
I just cant form the xpath query though! The closest ive got is /result/requests/request/form[@name='customer'] which selects all the customer nodes, but I cant work out how to then limit the nodes selected to be for only certain customers.....
Can anybody point me in the right direction?
Thanks
Simon