AnsweredAssumed Answered

Regarding 'XML Xpath Assertion'

Question asked by sum528 on Jun 29, 2018
Latest reply on Jul 2, 2018 by Joel NeSmith



Consider the following xml request:

<?xml version="1.0"?>

<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?


Ulrich_Vogt Chris_StalloneJ_NeSmithMarcyNunns