Get just some node fin the xml response from a webservice

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi all
Im very newbie in <span id="x_result_box" lang="en <span>these matters and using VBA....
<span id="x_result_box" lang="en <span>Can someone explain me why in the code below from row 10 to 50 works fine and the line 69 doesnt ?
<span id="x_result_box" lang="en <span>And also why in the line 100 I get the error [438 object doesnt support thisproperty or method]... in spite of
intellisense sugestion...
<pre class="prettyprint lang-vb Public Sub TEZTWS
Dim xmlResult As MSXML2.DOMDocument60
Dim objSrvHTTP As MSXML2.ServerXMLHTTP60
Dim xmlNOList As MSXML2.IXMLDOMNodeList
Dim xmlNO As MSXML2.IXMLDOMNode
.
.
.
.
.
bodyREQ ="soap xml service definition ....."
objSrvHTTP.send (bodyREQ)
Do While objSrvHTTP.readyState <> 4
objSrvHTTP.waitForResponse (500)
Loop
create XML DOM object
Set xmlResult = New DOMDocument60
xmlResult.async = False
.
.
10 xmlResult.Load (objSrvHTTP.responseBody)
20 Set xmlNOList = xmlResult.SelectNodes("//*")
30 For Each xmlNO In xmlNOList
40 Msgbox xmlNO.Text
50 Next

69 Set xmlNOList = xmlResult.SelectNodes("/node1/node2")


100 xmlResult.LoadXML (objSrvHTTP.responseXML)

End sub[/code]
Thanks
João


View the full article
 
Back
Top