zoukankan      html  css  js  c++  java
  • flex中使用DataGrid显示xml

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" creationComplete="bookDate.send()">
    <mx:HTTPService id="bookDate" url="huiyuan.xml" />
     


    <mx:DataGrid width="825.5" height="377" dataProvider="{bookDate.lastResult.NewDataSet.NewView}"  enabled="true">
    <mx:columns>
    <mx:DataGridColumn headerText="序列号" dataField="id"  width="100"/>
    <mx:DataGridColumn headerText="姓名" dataField="name"/>
    <mx:DataGridColumn headerText="电话" dataField="phone"/>
    <mx:DataGridColumn headerText="邮件" dataField="mail"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Style source="fcss.css"/>
         
    </mx:Application>

    xml数据文件格式 

     <?xml version="1.0" standalone="yes"?>

    <NewDataSet>

      <NewView>

        <id>4804</id>

        <name>韩xx</name>

        <mail>zzz@163.com</mail>

        <phone>zz226280</phone>    

      </NewView>

      <NewView>

        <id>4802</id>

        <name>吴ss</name>

        <mail>ddmm@gmail.com</mail>

        <phone>13062121dfd8</phone>   

      </NewView>

     </NewDataSet>

  • 相关阅读:
    8月10日
    8月9日
    8月8日
    8月7日
    8月6日
    8月5日
    《大道至简》读后感
    8月4日
    8月3日
    8月2日
  • 原文地址:https://www.cnblogs.com/fslnet/p/1846671.html
Copyright © 2011-2022 走看看