Use reference XML data element and attribute
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:XML id="chaptersXml"> <chapters label="Chapters"> <chapter label="Chapter 1"> <file label="File 1.1" /> </chapter> <chapter label="Chapter 2"> <file label="File 2.1" /> </chapter> </chapters> </mx:XML> <mx:Button click="trace(chaptersXml.chapter[0].@label)" /> </mx:Application>