Hey people!

I'm using this to pull data from one of the API's on a aff networking im on ..

It works most of the time, but it has a tendency to show nothing for results .. I'm not that great with coding and was wondering if someone can check the code out and prephaps let me a hand!


dim xmlObj, xmlList, XMLitem, keywordz, keywordz2, keywordz3

SUB showFeed(url)
    Set xmlObj = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
    xmlObj.async = false
    xmlObj.setProperty "ServerHTTPRequest", True
    If xmlObj.parseError.errorCode <> 0 Then
        Response.Write "Sorry, Server feed is unavailable.<br>"
    End If

Set xmlList = xmlObj.getElementsByTagName("item") 
Set xmlObj = Nothing 
For Each xmlItem In xmlList

Response.Write "<a href=" & xmlItem.childNodes(11).text & "><img src=" & xmlItem.childNodes(12).text & " alt='" & xmlItem.childNodes(5).text & "' width=100 border=0></a>" & "<br>"
Response.Write "<a href=" & xmlItem.childNodes(11).text & ">" & xmlItem.childNodes(5).text & "</a><br>"

If xmlItem.childNodes(7).text = "0" Then Response.Write "<font color=red>Price</font>: N/A - see site for latest price" Else Response.Write "<font color=red>Price</font>: $" & xmlItem.childNodes(7).text 

Response.Write "<br><b>Store</b>: " & xmlItem.childNodes(1).text &"<br>"
Response.Write "<b>Keywords:</b> " & xmlItem.childNodes(6).text & "<br>"
Response.Write "<hr>"
keywordz = xmlItem.childNodes(6).text
keywordz2 = xmlItem.childNodes(5).text
keywordz3 = xmlItem.childNodes(1).text

Set xmlList = Nothing