E4X support makes YQL is a great XML-generation engine. Here’s some code to create the response xml for a WebDAV PROPFIND request for a directory called webdav containing an empty file called foo.txt.
Note: to initially get a handle on what XML WebDAV outputs, I turned on WebDAV support in apache and made a curl request to it like this: curl -X PROPFIND –header “Depth:1” {user}:{pass}@{your ip address}/webdav/
You can run the code below in the YQL console.
[sourcecode lang=“xml”]