• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

getting html attribute instead of node...

Community Beginner ,
Dec 11, 2012 Dec 11, 2012

Copy link to clipboard

Copied

Im using httpservice to dynamically load  xml from a podcasts' rss feed and am playing the podcast episode from a node named GUID that is a simple mp3 URL... it worked fine, but now the rss has changed so that the mp3 url isnt in a NODE but rather is an attribute within a Node...

eg: <GUID theurl="http://....mp3">

my code currently uses the following variable assignment for the url:  var mp3url:String = data.guid; 

how do i retrieve the attribute 'theurl' (using the eg code above) for the variable string?   I tried data.guid[@theurl] but didnt work.

thanks for any help you all can provide on this.

Im  using FB 4.6 on a mac book pro

Views

544

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 12, 2012 Dec 12, 2012

Copy link to clipboard

Copied

LATEST





var xml:XML = <GUID theurl="newway">oldway</GUID>;




var oldway:String = xml.text(); // "oldway"




var newway:String = xml.@theurl; // "newway"

(You don't need the square brackets.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines