发表于: 2010-03-04 09:38:56 -
IP:220.248.*.*
只看该用户
大
中
小
沙发!
XML 和XMLList都继承于Object。如果XML是最小单位的话,XMLList与之的区别就是api doc中下面这句话。 The XMLList class contains methods for working with one or more XML elements. An XMLList object can represent one or more XML objects or elements (including multiple nodes or attributes), so you can call methods on the elements as a group or on the individual elements in the collection.
即XMLList是一个或多个XML的组合形式。 如XML的结构是 <data> <item>value1</item> <data> 那么XMLList的结构可以是一个XML <data> <item>value1</item> <data> 也可以是多个XML <data> <item>value1</item> <data> <data> <item>value2</item> <data>
XMLListCollection的继承于ListCollectionView,ListCollectionView这个类看着挺眼熟吧,不错我们最常用的ArrayCollection就是继承于这个ListCollectionView。api doc中下面这句话描述了XMLListCollection的作用 The XMLListCollection class provides collection functionality to an XMLList object and makes available some of the methods of the native XMLList class.
XMLListCollection的作用是给XMLList 增加一些集合功能如addItem等,前提是你需要 new XMLListCollection(new XMLList())
[本帖最后由 momoko8443 于 2010-03-04 09:42:56 编辑]
- 评分记录
-
brightACE
威望: +5 睿币: +5
操作理由: Nice Answer
2010-03-04 11:20:15
|