0

This is part of the XML:

<pubDate>Mon, 18 Nov 2013 10:43:28 +0100</pubDate>
  <category>Algemeen</category>
  <enclosure url="http://bin.snmmd.nl/m/m1mxwvnavj3a_sqr256.jpg" type="image/jpeg"/>
  <copyrightPhoto>nu.nl</copyrightPhoto>

I know that the following for loop places childnodes in an array.

for (var i:Number = 0; i < berichtnr; i++) {
            //puts title in titleArray      
            titleArray[i] = rssXML.channel.item[i].title;
            //puts date in dateArray
            dateArray[i] = rssXML.channel.item[i].pubDate;
        }

I want to place the link from childnode enclosure url in an array. How can this be done?

1 Answer 1

1

Attributes in XML are accessed with @ sign. To reach url, you need following:

rssXML.channel.item[i].enclosure.@url

Second option is to use attribute() method. For more info see: http://livedocs.adobe.com/flex/3/html/help.html?content=13_Working_with_XML_08.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.