flex in the DataGrid using external xml file as a data source

2010-02-24  来源:本站原创  分类:Flash  人气:323 

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:XML source="students.xml" /> <mx:XMLListCollection source="{stu.student}" /> <mx:DataGrid dataProvider="{students}"> <mx:columns> <mx:DataGridColumn dataField="name"/> <mx:DataGridColumn dataField="age" /> <mx:DataGridColumn dataField="gender" /> </mx:columns> </mx:DataGrid> </mx:Application>

One students.xml for the data file, as follows:

<students>
        <student>
                <name>zhxy1</name>
                <age>21</age>
                <gender>FEMALE</gender>
        </student>
        <student>
                <name>zhxy2</name>
                <age>22</age>
                <gender>MALE</gender>
        </student>
</students>
相关文章
  • flex in the DataGrid using external xml file as a data source 2010-02-24

    <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:XML source="students.xml" /> <mx:XMLListCollection source="

  • Flex air modify the external xml file 2010-09-06

    AIR file operations is not difficult to read the tutorial files you should meet all the basic operations. This tutorial mainly to the situation encountered in practice to explain We think there will be what file operations, nothing more than to creat

  • Flex using mx: HTTPService tag read XML file to generate charts 2010-11-09

    1.Flex <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top" backgroundColor="white" creationComplete=&qu

  • JAVA XML file to read data (transfer) 2010-04-13

    <? Xml version = "1.0" encoding = "UTF-8 "?><! DOCTYPE managers SYSTEM" manager-config.dtd "> <managers> <manager name="DBConnectionManager"> <service> net.csdn.blog. xport.IDBConnectio

  • android sax read xml file content utility subsidiary source 2010-04-26

    andorid read xml file content in three ways sax dom pull, which is the android comes with pull 1. First get to know more about xml file in the terminology <?xml version="1.0" encoding="UTF-8"?> <persons> <person> <

  • Read XML file using the Flex 2010-11-06

    Flex E4X support for the powerful functions, so in the xml file in flex operation is very simple. Next, summarize the commonly used method of reading the XML configuration file: 1 Use the Model tab in the form At the outset Model Tags: <mx:Model sour

  • hbm.xml xml file into the configuration of the external 2010-04-28

    hbm.xml can be inserted into an external xml file to replace the repeated use of the content. For example, I conducted here User points table, will use user0, user1, user2 like the table, so hbm mapping file contents are basically the same. Can use E

  • flex in the tree control using external xml as data source 2010-07-12

    Tree Controls If you use an external xml file as data source, you first need to introduce File. There are two ways: 1, Xml Code <mx:XML source="data/treeDataProvider.xml" /> <mx:XML source="data/treeDataProvider.xml"/> Tree

  • Custom right click menu (load xml file) 2010-09-13

    By loading the external xml file data, customize the context menu. xml file (setup.xml) <?xml version="1.0" encoding="UTF-8"?> <shell> <menu> <item url="http://www.baidu.com"> Visit Baidu </item>

  • easy to read tutorial flash xml file (change) 2010-04-14

    First, the establishment of XML objects: var myXML = new XML (); Second, the reference XML file: myXML.load ("data.xml"); Third, ignore the spaces: myXML.ignoreWhite = true; / / default is false 4, dealing with XML objects function: myXML.onLoad

  • Rss-Rome reader reads the XML file 2010-10-09

    Rss-Rome reader reads the XML file http://yueding920.blog.163.com/blog/static/352508902010521104649147/ Core code: java implementation code: rssUrl = "http://218.206.234.34:8080/rss-xmlrpc/testRss/test.xml"; / / RssUrl web address where the defi

  • Using oracle control file for high-volume data storage operation 2011-09-29

    Using oracle control file for high-volume data storage operations more efficient than the sql script file to be much higher. A 300M data file, ctl file storage in about 20mins or so, sql script file you need about 2h. Ctl control file using the follo

  • Flex integration of JAVA, JAVA returned from a XML file, then the datagrid values FLEX 2010-09-16

    Project. I FLEX page to access a JSP page called from the JSP page to get a XML. I have to the collection of the datagrid display in the FLEX approach. The following is the code of my LogFlex <? Xml version = "1.0" encoding = "utf-8"

  • Flex server-side XML file to read is loaded into the DataGrid in 2010-05-12

    Create a web project in eclipse test_db1 flex code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="loadXML()"&g

  • Read Flex server-side XML file is loaded into the DataGrid of 2010-05-12

    Create a web project in eclipse test_db1 flex code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="loadXML()"&g

  • flex Tree display xml file 2010-04-08

    I have a xml file as follows: <?xml version="1.0"?> <root> <field stuName="field1"> <field name="field2" /> <field name="field3" hide="yes" /> <field stuName="field4&q

  • flex action xml file. and the difference .. 2010-04-16

    xml file is as follows, treeMsg.xml: <?xml version="1.0" encoding="UTF-8"?> <pdml> <field showname="aa"> <field showname="ss"/> <field showname="dd"/> <field showname="

  • The solution: "set in the Flex DataGrid's data source, suggesting that null" 2010-12-19

    The solution: "set in the Flex DataGrid's data source, suggesting that null" Operating Environment: MyEclipse8.5GA, Flex Builder4 plugin. BlazeDS, MySQL, tomcat6 First configuration: Spring Hibernate blazeDS In the remoting-config.xml, the confi

  • Cross-domain policy file crossdomain.xml file on the 2011-05-10

    http://www.xiaonei.com/crossdomain.xml <! - Http://www.xiaonei.com/ -> ? <cross-domain-policy> <allow-access-from domain="*.xiaonei.com"/> <allow-access-from domain="xiaonei.com"/> </ Cross-domain-policy>

  • ANT-build.xml file Xiangjie 2010-03-29

    The concept of Ant may be some readers are not connected to what is Ant and entry can use it, but as long as the use by Linux systems from readers should be aware of make this command. When compiling Linux kernel and some software source code, we oft