troubleshooting Question

Trouble selecting this particular node's text with XML DOM...???

Avatar of Andrew Angell
Andrew AngellFlag for United States of America asked on
Web Languages and StandardsASP
10 Comments1 Solution391 ViewsLast Modified:
I've got an XML document structured as follows:

<?xml version="1.0" encoding="UTF-8"?>
<AddItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2005-08-15T16:31:12.334Z</Timestamp>
<Ack>Success</Ack>
<CorrelationID>00000000-00000000-00000000-00000000-00000000-00000000-0000000000</CorrelationID>
<Version>421</Version>
<Build>e421_core_Bundled_1630320_R1</Build>
<ItemID>4503422915</ItemID>
<StartTime>2005-08-15T16:31:08.537Z</StartTime>
<EndTime>2005-08-20T16:31:08.537Z</EndTime>
<Fees>
     <Fee>
          <Name>AuctionLengthFee</Name>
          <Fee currencyID="USD">0.0</Fee>
     </Fee>
     <Fee>
          <Name>ListingFee</Name>
          <Fee currencyID="USD">1.1</Fee>
     </Fee>
</Fees>
</AddItemResponse>

There are actually a bunch of different <Fee> elements, each with their own <Name> and <Fee> child elements.  I need to get these XML values stored into ASP variables.  The top ones are easy because they're directly under the root element so I used:

      Set startTime = xmlDoc.getElementsByTagName("AddItemResponse")
                  For Each childNode In startTime
                              StartTime = childNode.selectSingleNode("StartTime").text
                  Next

as an example.  I need to get the ListingFee value, 1.1, into a variable and I'm having trouble because I don't know the syntax to use to translate: text value of <Fee> element that is a child of a <Fee> element and has a <Name> sibling with text value ListingFee.  Does that make any sense?  

Any information on this would be greatly appreciated Thanks!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 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 10 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