943,648 Members | Top Members by Rank

Jul 4th, 2009
0

Extracting tag attributes

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
maplax is offline Offline
8 posts
since May 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in RSS, Web Services and SOAP Forum Timeline: RSS feeds to PDF
Next Thread in RSS, Web Services and SOAP Forum Timeline: Convert soap reply result from string to different tyoe





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC