I tried your vb program. However, some functions could not work properly. I specified the resource path and click “Get resource”. All XML doc were shown and I tried the “GET/MODIFY” buttons, I got error “the specified Path/file name cannot be accessed or is invalid” or “file not found”. What’s the error?
Besides, what were the function of button “Property names” & “All properties” ?
Which resource are you trying to GET. This must be a XML resource.
So if you would start out with a blanco resource you would get your collections. Click on collections and you’ll get your document types. Then click on a document type to get your documents. That would be something like Document_1.xml, Document_2.xml etcetera.
If you select a document and then click on GET Document the document will be retrieved and saved in c:\data<something>. Probably you need to change this to C:\TEMP or use Environ$(“TEMP”) which points to your temporary directory.
This same file is used as input in order to modify your document. Here it probably goes wrong.
The only thing that you need to do is to change Const XMLFILENAME = “c:\data\result.xml” to an existing location, e.g. “c:\temp\result.xml”.
I use Const PROPNAME = “<?xml version='1.0'?>” to get all property names and Const ALLPROP = “<?xml version='1.0'?>” to retrieve all properties of the specified resource.
BTW the intention of this example is to get some insight about how the WebDAV interfaces works, nothing else. I you want to build your own WebDAV COM class, then please do so (and do not forget to send a copy to this list ;-).