Extracting tag attributes

Please support our RSS, Web Services and SOAP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: May 2009
Posts: 6
Reputation: maplax is an unknown quantity at this point 
Solved Threads: 0
maplax maplax is offline Offline
Newbie Poster

Extracting tag attributes

 
0
  #1
Jul 4th, 2009
I spent last 10 hours trying to figure out how to extract attributes from this:

RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. <yweather:wind chill="76" direction="230" speed="8" />

RSS: http://weather.yahooapis.com/forecastrss?p=78620

RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. rsstxt1 = response[0].getElementsByTagName("yweather:wind").item(0).attributes[0].value;
doesn't work. And I tried everything else.

RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. response[0].getElementsByTagName("ttl").item(0).textContent
works fine

Just can't get any attribute values from tags with values instead of contents.

Please please help. Thanks.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the RSS, Web Services and SOAP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC