Consider the following xml request:
<TotalDetails> 2 </TotalDetails>
<itemId> 1234 </itemId>
<name> xylo </name>
<itemId> 7894 </itemId>
<name> phone </name>
<branch> abc </branch>
Note: <CustomerDetails> section is repeating twice in this request
<CustomerDetails> section in the incoming request to the VS may repeat 'n' number of times. this is dynamic. <TotalDetails> field value in the request denotes the number of <CustomerDetails> sections coming in the request.
the requirement here is: VS should ensure that for how many number of <CustomerDetails> sections repeating in the request, for all of it, the fields <name> and <branch> should always be present (which is mandatory).
can this be achieved in XML Xpath Assertion using a single xpath query for each field for multiple occurences?