XMLListCollection与XMLLIST区别

一直对XMLListCollection与XMLLIST不解,现列举使用方式给予说明:

XMLListCollection将XMLLIST包装,并且其可以排序、查找、定位。而XMLLIST做不到这些。

 

<mx:XMLListCollection id="treenode" source="{treenodelist}"/>

<mx:XMLList id="treenodelist">

<record id="1" name="1#" type="building" isBranch="true">

 <record id="1" name="1-101" bid="1" type="room"/>

 <record id="2" name="1-102" bid="1" type="room"/>

 <record id="26" name="9-101" bid="1" type="room"/>

 <record id="27" name="9-102" bid="1" type="room"/>

 <record id="28" name="9-201" bid="1" type="room"/>

 <record id="29" name="9-202" bid="1" type="room"/>

 <record id="40" name="新房屋" bid="1" type="room"/>

</record>

<record id="5" name="2#" type="building" isBranch="true"/>

<record id="3" name="3#" type="building" isBranch="true"/>

<record id="9" name="4#" type="building" isBranch="true"/>

</mx:XMLList>

你可能感兴趣的:(Collection)