I have a rails service reading an XML from a SOAP endpoint. The simplified structure is like:
<resource id="1287085300000102889" ...>
<prices>
<price datefrom="2018-05-25" dateto="2018-05-26" price="0.0" currency="EUR"/>
<price datefrom="2019-07-12" dateto="2019-07-13" price="1000.0" currency="EUR"/>
<price datefrom="2020-05-23" dateto="2020-05-24" price="1540.0" currency="EUR"/>
...
</prices>
</resource>
I´m parsing the information using Nokogiri gem that I think uses xpath. I would like to filter out all the prices of last year. I´m trying to do
prices = resource.xpath(".//prices/price[@dateto > '2019-01-01']")
but it´s not working.