flex 中使用xml文件

<artwork>  
    <piece>  
        <name>The Wall</name>  
        <image>artwork1.jpg</image>  
        <price>250</price>  
        <quantity>5</quantity>  
    </piece>  
     
    <piece>  
        <name>Blue Flake</name>  
        <image>artwork5.jpg</image>  
        <price>400</price>  
        <quantity>2</quantity>  
    </piece>  
     
    <piece>  
        <name>Butterfly</name>  
        <image>artwork6.jpg</image>  
        <price>375</price>  
        <quantity>17</quantity>  
    </piece>  
</artwork> 

<?xml version="1.0" encoding="utf-8"?>  
<mx:Application  
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    viewSourceURL="src/ItemEditorDefault/index.html" 
    width="450" height="140"     
>  
     
    <mx:Model id="artwork" source="model/artwork.xml"/>  
    <mx:DataGrid  
        rowCount="4" 
        dataProvider="{artwork.piece}" 
        editable="true" 
    />  
 
</mx:Application>

本文来自CSDN博客http://blog.csdn.net/heimaoxiaozi/archive/2009/06/11/4260215.aspx

你可能感兴趣的:(xml,.net,Flex,Blog)