Code:
xmlversion="1.0"?><a:multistatusxmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"xmlns:d="urn:schemas:httpmail:"xmlns:c="xml:"xmlns:a="DAV:">
<a:response>
<a:href>http://server/exchange/talksandy/</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<d:drafts>http://server/exchange/talksandy/Drafts</d:drafts>
</a:prop>
</a:propstat>
</a:response>
</a:multistatus>
How can I select drafts element using C#.
I tried using following code
Code:
XmlDocument doc = newXmlDocument();
doc.LoadXml(reader.ReadToEnd());
XmlNamespaceManager namespaceManager = newXmlNamespaceManager(doc.NameTable);
namespaceManager.AddNamespace("mail", "urn:schemas:httpmail:");
namespaceManager.AddNamespace("a", "DAV:");
XmlElement element = doc.SelectSingleNode("/a:response/a:propstat/a:prop/mail:drafts",namespaceManager) as XmlElement;
But this code is not working. Here reader contains the XML I provided above.
Please help.
Thanks