Forum Discussion
pradeepbishnoi
15 years agoContributor
Firstly the XML you pasted was incomplete.. so have created the complete XML.
Now using this XML, you can verify that BOB is from Boston & JOHN is from Miami by placing 2 xpath assertions (ignoring namespaces).
(((//*:H2/*:e[1]/*:n1)="BOB") and ((//*:H2/*:e[1]/*:n2)="Boston"))
(((//*:H2/*:e[2]/*:n1)="JOHN") and ((//*:H2/*:e[2]/*:n2)="Miami"))
I hope this would help.
Regards,
/Pradeep Bishnoi
http://learnsoapui.wordpress.com
<Response xmlns="http://iWantToIgnoreThis">
<H1>
<H2>
<e>
<n1>BOB</n1>
<n2>Boston</n2>
<n4>xyz34</n4>
</e>
<e>
<n1>JOHN</n1>
<n2>Miami</n2>
<n4>abadafeadsflasdf</n4>
</e>
</H2>
</H1>
</Response>
Now using this XML, you can verify that BOB is from Boston & JOHN is from Miami by placing 2 xpath assertions (ignoring namespaces).
(((//*:H2/*:e[1]/*:n1)="BOB") and ((//*:H2/*:e[1]/*:n2)="Boston"))
(((//*:H2/*:e[2]/*:n1)="JOHN") and ((//*:H2/*:e[2]/*:n2)="Miami"))
I hope this would help.
Regards,
/Pradeep Bishnoi
http://learnsoapui.wordpress.com