haz azezan
haz azezan

Reputation: 27

XPath date inquiry

I have this XML

<Table>
<mdate>2014-04-08T00:00:00+03:00</mdate>
<title>Hello</title>
</Table>

I want to do search transaction by date I'm trying to use this one

//Table[contains(mdate,2014-04-08*)]

but it doesn't work

Any hint ?

Thanks

Upvotes: 1

Views: 50

Answers (1)

har07
har07

Reputation: 89285

You don't need wildcard character in this case. You can either use contains() function this way :

//Table[contains(mdate,'2014-04-08')]

or use starts-with() function instead :

//Table[starts-with(mdate,'2014-04-08')]

Both XPath queries above will match <Table> element in this question

Upvotes: 1

Related Questions