troubleshooting Question

how to fix asp/xpath code

Avatar of GessWurker
GessWurker asked on
5 Comments1 Solution1241 ViewsLast Modified:
I'm trying to get the attached code I found and slightly modified to work. No luck. Where have I gone wrong? Who can help? I'd like to be able to assign each child element of inm:Record to a variable. At the moment, I'm getting zilch.

Thanks for any and all help.
<%@ Language="VBScript" %>
<title>User info</title>
Dim feedURL
Dim XmlDocument
Set XmlDocument = Server.CreateObject("Msxml2.DOMDocument.6.0")
XmlDocument.setProperty "ServerHTTPRequest", true
XmlDocument.async = False
Dim Loaded
Loaded = XmlDocument.load(feedURL)
If Loaded Then
Dim email, password, fName, lName, schDiv, schName, otherSD, addr1, addr2, city, state, zip, phone, fax, chk, superInt, regDate
Set Items = XmlDocument.selectNodes("//inm:Results/inm:Recordset/inm:Record")
Response.Write "<p>Feed from " & feedURL & " has currently " & Items.Length & " items.</p>" & VbCrLf
Response.Write "<ul>" & VbCrLf
For Each Item in Items
Set Email = Item.selectSingleNode("inm:Email/text()")
If Email Is Nothing Then
EmailText = ""
EmailText =
End If
Set password = Item.selectSingleNode("inm:Password/text()")
If password Is Nothing Then
password = ""
password =
End If
Set fName = Item.selectSingleNode("inm:First_Name/text()")
If fName Is Nothing Then
fNameText = ""
fNameText =
End If
End If
Response.Write("<BR>First name: " & fName)
Response.Write("<BR>Last name: " & lName)
Response.Write("<BR>Email: " & email)
Response.Write("<BR>password: " & password)
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros