Extracting nodes using classical ASP

I have a snippet of coding - listed below - in which I am having problems figuring out how to pull a node.
I have also listed the XML document. I can loop very well to extract the <SERVICEPROVIDER> without a problem.
But I have not been able to construct my loop to extract the <ITEMAMOUNT>.
I am thinking I need to use xmlElementsByTagName(el, name, recursive = FALSE) - but I don't know.
There be many. It certainly does not like my inner loop where I am trying to extract the  <CATEGORY> and the  <QTY>and the       <DESCRIPTION>
My loop to process the <SERVICEPROVIDER>  works correctly.
But when I try to extract the nodes under <ITEMAMOUNTLIST>, it spits in my face :(   And probably rightfully so too.
I have also posted the xml document. And  snapshot of the error message.
Any help appreciated.

        set xdDoc = Server.CreateObject("MSXML2.DOMDocument.6.0")
	
	xdDoc.load "C:\VAXXML\SOMEVAX.XML"
		
       Set colChildNodes = xdDoc.selectNodes("///ITEMAMOUNT")
	
	'xmlElementsByTagName(el, name, recursive = FALSE)
	'xmlElementsByTagName("ITEMAMOUNT,"TRAVELCATEGORY")
	
	'extract item amounts
		if xdDoc.parseError = 0 then
	  	    'extract item info
			 for each objItem in colChildNodes
			    vqty = objItem.selectSingleNode("DESCRIPTION")
			    vremarks = objItem.selectSingleNode("REMARKS")
			    response.write "<BR>QTY:" & vqty & " " & vremarks
			 next
	    else
             ' display error  message
        end if 	 
	'end of extracting item info


	'extract service providers
      
      Set colNodes = xdDoc.selectNodes ("//SERVICEPROVIDER")

	if xdDoc.parseError = 0 then
	    for each objProvider in colNodes
		    'get provider info
		    response.write "<BR> inside for/next"
		   	vsegnbr = objProvider.selectSingleNode("PROVIDERTYPE").text
			if vsegnbr <> "5" then
   		    	vprovider = objProvider.selectSingleNode("SERVICEPROVIDERNAME").text
		    	vbegindate = objProvider.selectSingleNode("STARTDATE").text
		    	venddate = objProvider.selectSingleNode("ENDDATE").text
			    response.write "<BR>Provider Type is: " & vsegnbr
	    	    response.write "<BR>Provider is: " & vprovider
	    	    response.write "<BR>Begin date is: " & vbegindate
	    	    response.write "<BR>End date is: " & venddate
			end if
		next
	 else
        ' display error message
    end if 	 
	   
%>

Open in new window


Here is the xml document
<?xml version="1.0" encoding="utf-8"?>
<SERVICECARD>
  <DATEFORMAT>MMDDYYYY</DATEFORMAT>
  <RESCARDMOREFIELD>
    <UDIDNO />
    <UNITVALUE />
  </RESCARDMOREFIELD>
  <SERVICEINFO>
    <RESTYPE>7</RESTYPE>
    <ITEMAMOUNTLIST>
      <ITEMAMOUNT>
        <CATEGORY>0</CATEGORY>
        <QTY>1</QTY>
        <DESCRIPTION>CURB SERVICE</DESCRIPTION>
       </ITEMAMOUNT>
      <ITEMAMOUNT>
        <CATEGORY>5</CATEGORY>
        <QTY>1</QTY>
        <DESCRIPTION>2 FREE TICKETS FOR FREE PARKING</DESCRIPTION>
      </ITEMAMOUNT>
      <ITEMAMOUNT>
        <CATEGORY>5</CATEGORY>
        <QTY>1</QTY>
        <DESCRIPTION>INCLUDES 10 FREE MILES</DESCRIPTION>
      </ITEMAMOUNT>
      <SERVICEPROVIDER>
        <PROVIDERTYPE>0</PROVIDERTYPE>
        <SERVICEPROVIDERNAME>LOUD LARRY TAXIS</SERVICEPROVIDERNAME>
        <SERVICEPROVIDERCODE>LL</SERVICEPROVIDERCODE>
        <STARTDATE>07192017</STARTDATE>
        <ENDDATE>07192017</ENDDATE>
      </SERVICEPROVIDER>
      <SERVICEPROVIDER>
        <PROVIDERTYPE>0</PROVIDERTYPE>
        <SERVICEPROVIDERNAME>COOL LUKE RIDES</SERVICEPROVIDERNAME>
        <SERVICEPROVIDERCODE>CLR</SERVICEPROVIDERCODE>
        <STARTDATE>07232017</STARTDATE>
        <ENDDATE>07232017</ENDDATE>
      </SERVICEPROVIDER>
   </SERVICEINFO>
</SERVICECARD>

Open in new window

ItemAmountList-ItemAmount.JPG
OverthereAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zc2Commented:
You have three slashes instead of two in
 Set colChildNodes = xdDoc.selectNodes("///ITEMAMOUNT")
should be
 Set colChildNodes = xdDoc.selectNodes("//ITEMAMOUNT")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OverthereAuthor Commented:
To my rescue once again! I also forgot to add a .text to the end of my line. Thank you for all your help :}
0
zc2Commented:
You are welcome
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.