Search Flex Components Free

Custom Search

December 25, 2007

Flex Embedding static xml data Source Code

Flex Data Static (Embedded) Sample Source Code:
Create a file:

XmlData .mxml

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundAlpha="0">

<!--
The XML document is embedded in the SWF file.
For dynamic data, use one of the dynamic data services (HTTPService, WebService, RemoteObject)
-->
<mx:Model id="myEmployee" source="../assets/employee.xml"/>

<mx:Label id="fname" text="{myEmployee.phonebook.employee.name.first}"/>
<mx:Label id="lname" text="{myEmployee.phonebook.employee.name.last}"/>
<mx:Label id="phone" text="{myEmployee.phonebook.employee.phone}"/>

</mx:Application>

Related Flex Tutorials