ThomasAu
14 years agoContributor
assert multiple nodes while ignoring namespace?
I found that I can assert a single nodeAND ignore namespace
by using:
what if I want to assert the whole chunk and also use wildcards?
for instance:
So, I want to make sure that if node1 = 123, then node2 = ABC, node2a = *, node3 = foo, and node3a = *.
I was hoping I could declare the following:
and have expected result:
Any ideas?
<Response xmlns="http://uri.foo">
<node1>123</node1>
<node2>ABC</node2>
by using:
exists(//*[local-name()='node1']/*[local-name()='node2'])
what if I want to assert the whole chunk and also use wildcards?
for instance:
<Response xmlns="http://uri.foo">
<node1>123</node1>
<node2>ABC</node2>
<node2a>thisChanges</node2a>
<node3>foo</node3>
<node3a>thisChanges</node3a>
</node1>
So, I want to make sure that if node1 = 123, then node2 = ABC, node2a = *, node3 = foo, and node3a = *.
I was hoping I could declare the following:
//*[local-name()='Response']
and have expected result:
<node1>123</node1>
<node2>ABC</node2>
<node2a>*</node2a>
<node3>foo</node3>
<node3a>*</node3a>
</node1>
Any ideas?