I have some XML which I am testing, which has set as one of it's elements the date and time. This obviously will change every time the test is run.
Is there a way to compare the XML and have this node value ignored, or just checked with a regular expression or something.
The XML I am testing is as follows:
<xml-fragment>
<core:date xmlns:core="http://www.company.com/commerce/common/V1/core">2010-06-24T21:41:22.456+01:00</core:date>
<core:serviceName xmlns:core="http://www.company.com/commerce/common/V1/core">calculateNextAndFuturePayments
</core:serviceName>
<core:ackRequired xmlns:core="http://www.company.com/commerce/common/V1/core">false</core:ackRequired>
<v1:viewingCardNumber xmlns:v1="http://www.company.com/commerce/calculateNextAndFuturePayment/V1">405536053
</v1:viewingCardNumber>
</xml-fragment>
I would like to check that the initial element (core:date) is in the date format, but the values are irrelevant for equality purposes.
Thanks