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
Copy link to clipboard
Copied
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.)