Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
This example examines the value for a Web Store property. A script in an HTML page creates the XMLDOM and XMLHTTP objects to submit the request.
Using the XMLDOM object model, nodes are created by using the AppendChild method. If a node needs to be nested within another node, you must append the new node to the correct parent.
Note that the XMLDOM object, to be passed to the XMLHTTP object, contains a CreateProcessingInstruction node to contain the XML Version information. This should be the first child node for HTTP requests.
The XMLHTTP object’s Send method sends the XMLDOM object containing the well formed nodes in an XMLDOM object.
To check status, a message box displays the XMLHTTP SatusText, followed by the XML of the XMLDOM object returned from the XMLHTTP object.
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE>PROPFIND</TITLE> </HEAD> <BODY> <SCRIPT FOR=window EVENT=onload LANGUAGE=VBScript> <!-- Set req = CreateObject("Microsoft.XMLHTTP") Set domin = CreateObject("Microsoft.XMLDOM") Set domback = CreateObject("Microsoft.XMLDOM") req.Open "PROPFIND", "http://microsoft.com/public/docs/myFile.doc", False, "TheDomain\Administrator", "thepassword" req.setRequestHeader "Content-Type", "text/xml; charset=""UTF-8""" Set oPi = domin.createProcessingInstruction("xml", "version='1.0'") domin.appendChild(opi) Set PFind = Domin.CreateNode(1, "d:propfind", "DAV:") domin.AppendChild PFind Set DProp = Domin.CreateNode(1, "d:prop", "DAV:") PFind.AppendChild DProp Set Author = Domin.CreateNode(1, "O:Author", "urn:schemas-microsoft-com:office:office") DProp.AppendChild Author MsgBox domin.XML, ,"IN: PROPFIND" req.Send Domin MsgBox req.StatusText, ,"PROPFIND" Set domback = req.ResponseXML MsgBox domback.XML, ,"OUT: PROPFIND" MsgBox domback.Text, ,"OUT: PROPFIND (text)" //--> </SCRIPT> </BODY> </HTML>