Bind to an XMLList or an E4X Query : XMLList « Data Model « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Data Model » XMLListScreenshots 
Bind to an XMLList or an E4X Query
Bind to an XMLList or an E4X Query
         


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

    <mx:Script>
        

        [Bindable]
        private var xmlItems:XML = new XML("<CATALOG><PLANT id='1'><COMMON>A</COMMON><ZONE>4</ZONE><LIGHT>Shady</LIGHT><PRICE>$2.44</PRICE><AVAILABILITY>031599</AVAILABILITY></PLANT></CATALOG>");
  
    </mx:Script>
    
    
    <mx:DataGrid dataProvider="{xmlItems.PLANT.(ZONE == 4)}">
        <mx:columns>
            <mx:DataGridColumn dataField="COMMON"/>
            <mx:DataGridColumn dataField="PRICE"/>
            <mx:DataGridColumn dataField="AVAILABILITY"/>
            <mx:DataGridColumn dataField="LIGHT"/>
        </mx:columns>
    </mx:DataGrid>
</mx:Application>

   
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Using an XMLList component to configure menu data
2.XMLListCollection component wrapped around an XMLList
3.Creating an XMLList component to drive a List componentCreating an XMLList component to drive a List component
4.Using XMLListUsing XMLList
5.Wrapping an XMLListCollection around an XMLList
6.Use an XMLListCollection objectUse an XMLListCollection object
7.Add an XMLList to an XML Object
8.Filter and Sort an XMLListCollectionFilter and Sort an XMLListCollection
9.XMLListCollection With ListXMLListCollection With List
10.Time formatTime format
w_w_w_.j_a_v__a__2__s___.c_o__m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.