autoscout24
15 years agoContributor
Assertion for nodes with different counts of childs
Hi everybody,
I have question regarding XPath assertions. Most of the time the web service responses contains only one phone number:
For example:
<a:phonenumbers>
<a:number>*</a:number>
</a:phonenumbers>
But sometimes there are more than one number.
For example:
<a:phonenumbers>
<a:number>*</a:number>
<a:number>*</a:number>
<a:number>*</a:number>
</a:phonenumbers>
Is there an easy way to add an assertion which works for both cases?
The following one unfortunately doesn't work:
<a:phonenumbers>*</a:phonenumbers>
Regards,
Andreas
I have question regarding XPath assertions. Most of the time the web service responses contains only one phone number:
For example:
<a:phonenumbers>
<a:number>*</a:number>
</a:phonenumbers>
But sometimes there are more than one number.
For example:
<a:phonenumbers>
<a:number>*</a:number>
<a:number>*</a:number>
<a:number>*</a:number>
</a:phonenumbers>
Is there an easy way to add an assertion which works for both cases?
The following one unfortunately doesn't work:
<a:phonenumbers>*</a:phonenumbers>
Regards,
Andreas