Your iTunes playlist with Flex

November 25, 2007

Follow up to a tutorial I wrote a long time ago, here's how to display the XML file with Flex. Mike, no need for AS3 ;-)

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=""
layout="vertical" verticalAlign="top" backgroundColor="white"

<mx:HTTPService id="itunesXML" url="iTunes.xml" resultFormat="e4x" />
<mx:XMLListCollection id="songs" source="{}" />

<mx:DataGrid id="dataGrid" dataProvider="{songs}" width="100%">
  <mx:DataGridColumn id="artist" dataField="Artist" headerText="Artist" />
  <mx:DataGridColumn id="album" dataField="Album" headerText="Album" />
  <mx:DataGridColumn id="bandname" dataField="Name" headerText="Name:" />

See the Itunes playlist with Flex SWF example or take a look at the source file here.

Older posts...

You can also browse the archives or go home


Hi, I’m Tim. I’m a Software Engineer at You can read more about me or follow @pims on Twitter or ask me almost anything on