Use deep-equal($node1, $node2)
for comparing whole subtrees.
deep-equal(//customer/id, doc("cust.xml")/customer/id)
If there are multiple customer ids, you will have to loop over them yourself; deep-equal
does not have the same "set semantics" like =
has.
Opening documents with doc(...)
is somewhat implementation dependent. SOAPUI uses Saxon to evaluate XPath and XQuery, so read their documentation on the doc(...)
function to realize they want the URI of the element, like you could pass one to Java's URIResolver
class.
doc("file:///C:/Documents and Settings/Testing related/cust.xml")