5 Replies Latest reply on Jan 19, 2010 1:09 AM by deathcab001

    Accessing those extra params in an XML file

    deathcab001

      Hello,

       

      Say for example i have a flex component that pulls in data from an XML file (last.fm), I can get it to display the normal tags as so:

       

      <mx:Text text="{data.name}" />

       

      the XML that last.fm provides is:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <lfm status="ok">

       

      <recenttracks user="RJ" page="1" perPage="2" totalPages="15332">
          <track>
              <artist mbid="">Florence + The Machine</artist>
              <name>You've got the Love</name>
              <streamable>1</streamable>
              <mbid/>
              <album mbid="">Lungs</album>
              <url>http://www.last.fm/music/Florence%2B%252B%2BThe%2BMachine/_/Cosmic+Love</url>
              <image size="small">http://userserve-ak.last.fm/serve/34s/39934999.png</image>
              <image size="extralarge">http://userserve-ak.last.fm/serve/300x300/39934999.png</image>
              <date uts="1263401665">13 Jan 2010, 16:54</date>
          </track>
         
      </recenttracks>

       

      </lfm>

       

      what i want to do is create an image, with the source from the XML file, but there are more than one IMAGE tags in the xml file, and I don't know how to tell it to use the "small" version for example.

       

      Any tips? Thanks