I have a XML documents which I would like to extract some data from using XPath. Here is a block in the xml that I'm interested in:
<SalesPrice ElementId="719304324">
<CountryCodeA2>DE</CountryCodeA2>
<CurrencyISOCode>EUR</CurrencyISOCode>
<ValidFrom>2016-10-21T09:39:16.000+02:00</ValidFrom>
<CancelDate>2016-10-25T09:39:16.000+02:00</CancelDate>
<Amount>3595</Amount>
</SalesPrice>
I'm trying to get all <SalesPrice> nodes that are valid based on their <ValidFrom> and <CancelDate> values. But, the issue is that not all <SalesPrice> nodes have a <CancelDate> tag and my query below doesn't work:
/SalesPrice[ValidFrom > 2016-10-23T11:15:50+00:00 and CancelDate < 2016-10-23T11:15:50+00:00]
So, what is the right query to get all SalesPrices even if their CancelDate is missing?