I am new to XML and I am creating a webDav program which requires a query XML to search through the directory listings but I don't know how to build it. I found an example that looks like this
sQuery += "<?xml version='1.0'?><D
ropfind xmlns
='DAV:' ";
sQuery += "xmlns:h=' ";
sQuery += "xmlns:hm='urn:schemas:httpmail:'><D
rop><h:adbar/>";
sQuery += "<hm:contacts/><hm:inbox/><hm
utbox/><hm:sendmsg/>";
sQuery += "<hm:sentitems/><hm:deleteditems/><hm:drafts/>";
sQuery += "<hm:msgfolderroot/><h:maxpoll/><h:sig/></D
rop></D
ropfind>";
This is to traverse a Exchange server WebDav folder but I just want to traverse a normal WebDav folder. I am writing the code in C++. I wrote a program to genereate what the XML file will look like and this is what I need
<?xml version="1.0" ?>
- <a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:c="xml:" xmlns:a="DAV:">
- <a:response>
<a:href>- <a
ropstat>
<a:status>HTTP/1.1 200 OK</a:status>
- <a
rop>
<a:getcontentlength b:dt="int">0</a:getcontentlength>
<a:creationdate b:dt="dateTime.tz">2006-07-06T17:26:02.088Z</a:creationdate>
<a:displayname>WebDav</a:displayname>
<a:getetag>"85d2a15343a4c61:31c"</a:getetag>
<a:getlastmodified b:dt="dateTime.rfc1123">Mon, 10 Jul 2006 17:07:29 GMT</a:getlastmodified>
- <a:resourcetype>
<a:collection />
</a:resourcetype>
<a:supportedlock />
<a:ishidden b:dt="boolean">0</a:ishidden>
<a:iscollection b:dt="boolean">1</a:iscollection>
<a:getcontenttype />
</a
rop>
</a
ropstat>
</a:response>
- <a:response xmlns:d="urn:schemas-microsoft-com:">
<a:href>- <a
ropstat>
<a:status>HTTP/1.1 200 OK</a:status>
- <a
rop>
<d:Win32CreationTime>Fri, 30 Jun 2006 16:55:12 GMT</d:Win32CreationTime>
<d:Win32LastAccessTime>Thu, 06 Jul 2006 17:28:01 GMT</d:Win32LastAccessTime>
<d:Win32LastModifiedTime>Thu, 06 Jul 2006 17:28:01 GMT</d:Win32LastModifiedTime>
<d:Win32FileAttributes>00000020</d:Win32FileAttributes>
<a:getcontentlength b:dt="int">2427</a:getcontentlength>
<a:creationdate b:dt="dateTime.tz">2006-07-06T17:27:25.292Z</a:creationdate>
<a:displayname>Notes.txt</a:displayname>
<a:getetag>"5b2777221a1c61:31c"</a:getetag>
<a:getlastmodified b:dt="dateTime.rfc1123">Thu, 06 Jul 2006 17:27:25 GMT</a:getlastmodified>
<a:resourcetype />
- <a:supportedlock>
- <a:lockentry>
<a:write />
<a:shared />
</a:lockentry>
- <a:lockentry>
<a:write />
<a:exclusive />
</a:lockentry>
</a:supportedlock>
<a:ishidden b:dt="boolean">0</a:ishidden>
<a:iscollection b:dt="boolean">0</a:iscollection>
<a:getcontenttype />
</a
rop>
</a
ropstat>
</a:response>
</a:multistatus>
I hope this is easy becase I really don't know what I am doing for this so any help or explination would be great. Thanks
sQuery += "<?xml version='1.0'?><D
sQuery += "xmlns:h=' ";
sQuery += "xmlns:hm='urn:schemas:httpmail:'><D
sQuery += "<hm:contacts/><hm:inbox/><hm
sQuery += "<hm:sentitems/><hm:deleteditems/><hm:drafts/>";
sQuery += "<hm:msgfolderroot/><h:maxpoll/><h:sig/></D
This is to traverse a Exchange server WebDav folder but I just want to traverse a normal WebDav folder. I am writing the code in C++. I wrote a program to genereate what the XML file will look like and this is what I need
<?xml version="1.0" ?>
- <a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:c="xml:" xmlns:a="DAV:">
- <a:response>
<a:href>- <a
<a:status>HTTP/1.1 200 OK</a:status>
- <a
<a:getcontentlength b:dt="int">0</a:getcontentlength>
<a:creationdate b:dt="dateTime.tz">2006-07-06T17:26:02.088Z</a:creationdate>
<a:displayname>WebDav</a:displayname>
<a:getetag>"85d2a15343a4c61:31c"</a:getetag>
<a:getlastmodified b:dt="dateTime.rfc1123">Mon, 10 Jul 2006 17:07:29 GMT</a:getlastmodified>
- <a:resourcetype>
<a:collection />
</a:resourcetype>
<a:supportedlock />
<a:ishidden b:dt="boolean">0</a:ishidden>
<a:iscollection b:dt="boolean">1</a:iscollection>
<a:getcontenttype />
</a
</a
</a:response>
- <a:response xmlns:d="urn:schemas-microsoft-com:">
<a:href>- <a
<a:status>HTTP/1.1 200 OK</a:status>
- <a
<d:Win32CreationTime>Fri, 30 Jun 2006 16:55:12 GMT</d:Win32CreationTime>
<d:Win32LastAccessTime>Thu, 06 Jul 2006 17:28:01 GMT</d:Win32LastAccessTime>
<d:Win32LastModifiedTime>Thu, 06 Jul 2006 17:28:01 GMT</d:Win32LastModifiedTime>
<d:Win32FileAttributes>00000020</d:Win32FileAttributes>
<a:getcontentlength b:dt="int">2427</a:getcontentlength>
<a:creationdate b:dt="dateTime.tz">2006-07-06T17:27:25.292Z</a:creationdate>
<a:displayname>Notes.txt</a:displayname>
<a:getetag>"5b2777221a1c61:31c"</a:getetag>
<a:getlastmodified b:dt="dateTime.rfc1123">Thu, 06 Jul 2006 17:27:25 GMT</a:getlastmodified>
<a:resourcetype />
- <a:supportedlock>
- <a:lockentry>
<a:write />
<a:shared />
</a:lockentry>
- <a:lockentry>
<a:write />
<a:exclusive />
</a:lockentry>
</a:supportedlock>
<a:ishidden b:dt="boolean">0</a:ishidden>
<a:iscollection b:dt="boolean">0</a:iscollection>
<a:getcontenttype />
</a
</a
</a:response>
</a:multistatus>
I hope this is easy becase I really don't know what I am doing for this so any help or explination would be great. Thanks