Forum Discussion

autoscout24's avatar
autoscout24
Contributor
15 years ago

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

1 Reply

  • Hi,

    If I understand you correctly you want to have the wildcard at the phonenumbers level instead of having a matching number of number elements with wildcards in each!?

    Unfortunately this isn't possible as far as I know, please add a feature request in the Feature Request forum though, so we get it into the system.

    regards!

    /Ole
    eviware.com