DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   RSS, Web Services and SOAP (http://www.daniweb.com/forums/forum151.html)
-   -   Extracting tag attributes (http://www.daniweb.com/forums/thread201723.html)

maplax Jul 4th, 2009 11:22 pm
Extracting tag attributes
 
I spent last 10 hours trying to figure out how to extract attributes from this:

<yweather:wind chill="76"   direction="230"   speed="8" />

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

rsstxt1 = response[0].getElementsByTagName("yweather:wind").item(0).attributes[0].value;
doesn't work. And I tried everything else.

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.


All times are GMT -4. The time now is 8:58 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC