Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml http request

Status
Not open for further replies.

amiw

Programmer
Apr 1, 2003
113
GB
<?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?>
<RESULTS>
<RC>34</RC>
<O>1</O>
<S>5</S>
<SITE I=&quot;1&quot;>
<SITE I=&quot;2&quot;>
<SITE I=&quot;3&quot;>
<SITE I=&quot;4&quot;>
<SITE I=&quot;5&quot;>
</RESULTS>

heres my code

Set xml = Server.CreateObject (&quot;Microsoft.XMLHTTP&quot;)
xml.Open &quot;GET&quot;, &quot; , false'
xml.send

resultLength = CInt(xml.responseXML.selectNodes(&quot;RESULTS/SITE&quot;).length)

response.write resultLength

how come i get 0, when i know there are 34 results

any ideas?


thanks
Mic.
 
got it to work... thanks anyway
here's the code for reference purposes

<%
Set xml = Server.CreateObject (&quot;Microsoft.XMLHTTP&quot;)
xml.Open &quot;GET&quot;, &quot; false'
xml.send
Set objDom = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
objDom.async = False
objDom.LoadXML (xml.ResponseText)

Set objRoot = objDom.documentElement
resultLength=Cint(objRoot.selectNodes(&quot;SITE&quot;).length)
response.write &quot;There are &quot; & resultLength & &quot; SITE Nodes.<br>&quot;

%>
..........................
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top