troubleshooting Question

ASP Classic - Read XML File inner content

Avatar of Wayne Barron
Wayne BarronFlag for United States of America asked on
10 Comments1 Solution1324 ViewsLast Modified:
Hello, All;

Could someone please assist me in reading the inner parts of these nodes.
I can get all the other data, just not the count and views.

ASP Script
   Set objXML = Server.CreateObject("MSXML2.DOMDocument.3.0")
   objXML.async = False
objXML.Load (Server.MapPath("test.xml"))

For Each xmlProduct In objXML.documentElement.selectNodes("/feed/entry")
     theTitle = xmlProduct.selectSingleNode("media:group/media:title").text
     theDescr = xmlProduct.selectSingleNode("media:group/media:description").text 
     Rating = xmlProduct.selectSingleNode("media:group/media:community/media:starRating[@count]").text 
     statistics = xmlProduct.selectSingleNode("media:group/media:community/media:statistics").text
	 Response.Write "<strong>"&Server.HTMLEncode(theTitle) & "</strong><br>"
	 Response.Write "<strong>"&Server.HTMLEncode(thedescr) & "</strong><br>"
	 Response.Write "<strong>"&Server.HTMLEncode(Rating) & "</strong><br>"   
	 Response.Write "<strong>"&Server.HTMLEncode(statistics) & "</strong><br><hr/>"  

Set objXML = Nothing  

XML Script
The two area's that I need to get the values from are
        <media:starRating count="92070"/>   (The count)
        <media:statistics views="2151299"/>  (The Views)
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:media="" xmlns="">
      <media:title>Title Here</media:title>
      <media:description>information here</media:description>
        <media:starRating count="92070"/>
        <media:statistics views="2151299"/>

Thanks, All
Nitin Sontakke

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
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