Platform SDK: Exchange 2000 Server

Simple PROPFIND

[This is preliminary documentation and subject to change.]

This example gets the value for DAV:displayname properties in a Web Store folder. It creates a string variable (a concatenation of xml tags) that becomes an XML DOM object needed to send the PROPFIND request to the Web Store using the XMLHTTP object. This object’s Send method sends the PROPFIND request in the XML format required to obtain a response.

This example does not use XSL to render the XLM DOM object returned by the XMLHTTP RequestXML property. Instead, it iterates through an XMLNodeList collection, listing the NodeName and Text property values for the node. Because the XML DOM object obtained from the ResponseXML property contains namespace prefixes, the NamespaceURI property is included in the list as a clarification.

[VBScript]
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Simple PROPFIND</TITLE>
</HEAD>
<BODY LANGUAGE="VBScript" onLoad="doXML">
<SCRIPT FOR=WINDOW LANGUAGE=VBSCRIPT>
<!--

Sub DoXML
Dim objX, strR, objXD, objDE
Set objX = CreateObject("Microsoft.XMLHTTP")
objX.Open "PROPFIND", "http://myServer/public/docs/", FALSE, "ADOMAIN\Administrator", ""
strR = "<?xml version='1.0'?>"
strR = strR & "<d:propfind xmlns:d='DAV:'>"
strR = strR & "<d:prop><d:displayname/></d:prop></d:propfind>"
objX.SetRequestHeader "Content-type:", "text/xml"
objX.SetRequestHeader "Depth", "1"
objX.send(strR)

set docback = objX.responseXML


Dim objNodeList
Set objNodeList = docback.getElementsByTagName("*")
For i = 0 TO (objNodeList.length -1)
  Set objNode = objNodeList.nextNode
  Document.Write("<b>" & objNode.NamespaceURI & " " & objNode.NodeName & "</b> - ")
  Document.Write(objNode.Text & "<hr>")
Next
End Sub


//-->
</SCRIPT>

<P>&nbsp;</P>

</BODY>
</HTML>