本文介绍了XML和XMLList和的XMLListCollection在Flex 3的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请给我解释一下什么是XML和XMLList和的XMLListCollection之间的差异。如果可能的话用简单的话用的例子。先谢谢了。

Please explain me what is the difference between XML and XMLList and XMLListCollection. If possible in simple words with example. Thanks in advance.

推荐答案

首先,链接Flex 3语言参考 - 一个必须书签看这个东西了

First, links to Flex 3 Language Reference - a must have bookmark for looking this stuff up.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html

XML

XMLList

XMLListCollection

其次,我想说检查实例的XMLList 作为链接,让XML和XMLList的差异之间的良好工作的例子。

Secondly, I'd say check the Examples link for XMLList as that gives a good working example between the difference of XML and XMLList.

使用XML。

var mybooks:XML = <books>
  <book>
    <title>Book1</title>
  </book>
  <book>
     <title>Book2</title>
  </book>
</books>;

使用的XMLList从一个XML变量创建数据的子集。

Use XMLList to create subsets of data from an XML variable.

var mybookTitles:XMLList = mybooks.title;  

最后,XMLListCollection类基本上是一个辅助类的把你的XML或XMLList对象,并在控制使用它。

Finally, an XMLListCollection class is basically a helper class for taking your XML or XMLList object and using it in a control.

取这个片段中,从 mx.core.Repeater 的dataProvider 属性文档

Take this snippet from mx.core.Repeater docs on its dataProvider property

If you set it to an XML or XMLList, it is converted into an XMLListCollection.

希望这有助于

Hope this helps

这篇关于XML和XMLList和的XMLListCollection在Flex 3的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 03:55