I have an XML document whose structure is similar to the following:
<list>
<item>
<delivery>
<date>2014-12-31T00:00:00.000Z</date>
<!-- ... -->
</delivery>
<!-- ... -->
</item>
<item>
<delivery>
<date>2014-12-31T01:10:11.000Z</date>
</delivery>
</item>
<item>
<delivery>
<date>2014-12-31T12:30:15.059Z</date>
</delivery>
</item>
</list>
What I want to do is check the deliveries are all on the same day. What I did in SoapUI was check the following is true:
contains(/list/item[*]/delivery/date, "2014-12-31")
SoapUI then complains you can't hand contains() a collection. Fair enough. I then tried
/list/item[*]/delivery/date[contains(., "2014-12-31")]
but that seems to return the first date in its entirety: 2014-12-31T00:00:00.000Z
So, how can I run a contains on my collection? Alternatively, how can I check the days are the same for all deliveries?
Tiada ulasan:
Catat Ulasan