By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,334 Members | 2,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,334 IT Pros & Developers. It's quick & easy.

WebDAV/XML Question

P: n/a
We are using WebDAV to extract and save Exchange users EML files off. I
have run into a problem when I try and get a list of emails within a
folder. We use the following…

strQuery = "<?xml version=\"1.0\"?><D:searchrequest xmlns:D = \"DAV:\" >"
+ "<D:sql>SELECT \"DAV:href\", \"DAV:contentclass\", \"urn:schemas:mailheader:message-id\" "
+ "FROM \"" + strRootURI + "\""
+ "WHERE \"DAV:ishidden\" = false AND \"DAV:isfolder\" = false"
+ "</D:sql></D:searchrequest>";
And from that we get the XMLNodeLists…
hrefNodes = ResponseXmlDoc.GetElementsByTagName("a:href");
ContentClassNodes = ResponseXmlDoc.GetElementsByTagName("a:contentclas s");
MailHeaderMessageIDNodes =
ResponseXmlDoc.GetElementsByTagName("d:message-id");

if(hrefNodes.Count > 0)
{
// Loop through the display name nodes.
for(int i=0; i<hrefNodes.Count; i++)
{
string strClass = ContentClassNodes.Item(i).InnerText;
string strURL = hrefNodes.Item(i).InnerText;
string strMsgID = MailHeaderMessageIDNodes.Item(i).InnerText;

// If this is a message save the EML off into the table
if (strClass.CompareTo("urn:content-classes:message") == 0)
{
SaveLetter(strURL, strMsgID, strUserName, strPassword,
strDomain, strServer, conn);
}
}
}

The problem is that the count for the hrefNodes always seems to be double
the other 2. For example if I have 25 letters in a folder,
hrefNodes.Count is 50 and the other 2 show as 25. Is there a reason for
this?

Thank You,

Thomas Delany
(for David Marcil)
Mar 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Thomas,

If the xml query returns the an xml document, could you please post the xml
document here, so that I can make a repro. I don't know much about WebDav,
but I can give you some advice from the aspect of xml.

You try to post it in microsoft.public.exchange.development newsgroup for
WebDav issues.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Mar 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.