I'm using .Net 2.0. I realize that this means XPath 1.0 (which is
ridiculous).
So here's a document that I have that's not on disk but held in a variable
(I queried an Exchange appointment calendar):
<?xml version="1.0"?>
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:d="urn:schemas:httpmail:" xmlns:f="urn:schemas:mailheader:"
xmlns:c="xml:" xmlns:e="urn:schemas:calendar:" xmlns:a="DAV:">
<a:prop>
<a:parentname>http://mail.somewhere.com/davrdir/john.doe/Calendar/</a:parentname>
<d:subject>busy</d:subject>
<e:dtstart b:dt="dateTime.tz">2006-12-08T13:00:00.000Z</e:dtstart>
<e:dtend b:dt="dateTime.tz">2006-12-08T15:00:00.000Z</e:dtend>
<e:created b:dt="dateTime.tz">2006-09-13T19:26:18.000Z</e:created>
<e:lastmodified b:dt="dateTime.tz">2006-09-13T19:26:19.000Z</e:lastmodified>
<e:alldayevent b:dt="boolean">0</e:alldayevent>
<e:busystatus>BUSY</e:busystatus>
<e:recurrenceid b:dt="dateTime.tz">2006-12-08T13:00:00.000Z</e:recurrenceid>
<f:message-id><21************************************@dpex ch.Alarmo.net></f:message-id>
</a:prop>
</a:multistatus>
This is actually an exerpt from an entire document, so there are several
<a:propnodes.
I need to know the number of <a:propelements where the <e:dtstart>
element's value is between a date range and e:busystatus="BUSY".
The XPath expression that I'm trying to use is:
//a:prop[e:dtstart >= "2006-12-08T00:00:00.000Z" and e:dtstart <=
"2006-12-08T23:59:59.000Z" and e:busystatus="BUSY"]
This works great using XPath 2.0 but not with XPath 1.0. I know this because
I'm using XMLSpy to test my expressions.
Why is this? How can I do what I need to in .Net 20.?
Thanks in advance,
Mike