'extract passengers only if BID=NEW
if (Session("BID") = "NEW") and (xdDoc.parseError = 0) then
Set colNodes = xdDoc.selectNodes("//PASSENGERLIST/PASSENGER")
'if xdDoc.parseError = 0 then
'extract item info
for each objItem in colNodes
vlname = objItem.selectSingleNode("LASTNAME").text
vfname = objItem.selectSingleNode("FIRSTNAME").text
response.write "<BR>PASSENGER:" & vfname & " " & vlname
next
set colNodes = nothing
'end if
else
' display error message
end if
This is what I have in nearly-to-go-production page - you will notice I tried several definitions response.write "<BR>PASSENGERS NEXT"
if xdDoc.parseError = 0 then
if (Session("BID") = "NEW") then
vcounter = 1
' Set colNodes = xdDoc.selectNodes("//PASSENGERLIST/PASSENGER")
' Set colChildNodes = xdDoc.selectNodes("SERVICECARD/SERVICE/PASSENGERLIST/PASSENGER")
Set colChildNodes = xdDoc.selectNodes("SERVICECARD/SERVICE/PASSENGERLIST")
'extract item info
for each objItem in colChildNodes
response.write "INSIDE PASSENGERS LOOP<BR>"
vlname = objItem.selectSingleNode("LASTNAME").text
vfname = objItem.selectSingleNode("FIRSTNAME").text
response.write "<BR>PASSENGER:" & vfname & " " & vlname
' vpassid = MkPassengers(vcounter,vlname,vfname)
vcounter = (vcounter + 1)
next
set colChildNodes = nothing
end if
end if
response.end
<PASSENGERLIST>
<PASSENGER>
<LASTNAME>Rustler</LASTNAME>
<FIRSTNAME>Ted</FIRSTNAME>
</PASSENGER>
<PASSENGER>
<LASTNAME>Johnston</LASTNAME>
<FIRSTNAME>Hartley</FIRSTNAME>
</PASSENGER>
</PASSENGERLIST>
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”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.
Our community of experts have been thoroughly vetted for their expertise and industry experience.