473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

WebDAV/XML Question

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
1 1080
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jody Winston | last post by:
I'd like to present a view of an internal data store, which has Python interface built using SWIG, so that my users can traverse and manipulate the data store using familiar tools. My first...
0
by: Rade Josovic | last post by:
Hi, First implementation of WebDAV protocol is here: WebDAV .NET 1.0 from Independentsoft. Go to http://www.independentsoft.de The WebDAV .NET is WebDAV protocol API for Microsoft .NET...
0
by: Michael G. Schneider | last post by:
I just started playing around with WebDAV. The basic configuration is done and works. For example I am able to open a document via HTTP from within Word and save it. What I am really looking for...
3
by: Glenn Holliday | last post by:
I want an Access application to use an .mdb file via WebDAV in a remote directory. The Access documentation is silent as far as I can find. I've received some opinions that since Office XP adds...
0
by: SimpleSimple | last post by:
My company has an IIS 5, ASP.net intranet site that contains documents for employee use. The files are of various types (most often Office) and are stored in blob fields in a SQL2000 database. ...
1
by: =?Utf-8?B?QWxleCBSYWtvdg==?= | last post by:
Hi, I work at a webdav server. And i try to use Word as a webdav client. But I have strange problem. For some files Word sends LOCK command and works with them well. But for others it doesn't do...
0
by: arjen1984 | last post by:
I am now working on C# with WebDAV on Exchange now to get appointments. When I work local on the domain where the server is, i can get the appointments no problem. When I work outside of it, i get an...
7
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show...
0
by: Gionni | last post by:
Hi everyone, I need to upload a file to a Webdav server programmatically. I searcher about some library, but they are not free and I won't spend money just to do an upload. The question is: WebDav...
1
by: arnaud | last post by:
Hello, My Work: I must take mails with WEBDAV in a exchange server and save these in file in a directory.These files must have the msg extension. Problem: I don't find how save the mails in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.