Use xmllistcollection to compare the arraycollection objects.
You may want to know whether the xmllistcollection object or arraycollection object should be used as the data provider of the tree space when the remotely or locally obtained data is dynamically modified during runtime.
If the data source you use provides the formed XML, and you want to operate the XML data in the tree control. You should use the xmllistcollection object as the data provider. When mxml is used for marking, if the data source is an xmllist object, you should bind it to the source attribute of the xmllsitcollection object, and then bind the xmllistcollection object to the dataprovider attribute of the tree control.
When you want to dynamically change the object value, do not bind the xmllist or XML object to the dataprovider attribute of the tree control directly. When the data source is the lastresult property of the RPC (Remote Procedure Call) service and you want to use XML data, make sure that the resultformat attribute of the RPC component is set to E4X. When you use the E4X result format, the final result is xmllist, which can be bound to an xmllistcollection object.
Here is an example. For example, the data is dynamically changed and the arraycollection object is used as the data provider of the tree control. When mxml is used for marking, if you want to dynamically change arrayl, you should not directly bind the array object to the dataprovider attribute of the tree control. Instead, you should bind an array to the source attribute of an arraycollection object, and then bind the arraycollection object to the dataprovider attribute of the tree control.
When the data source is the lastresult object of the RPC (Remote Procedure Call) service and the resultformat attribute of the RPC component is converted into an object, you should use arrayutil. toarray () method to ensure that the object is an array. Then bind it to the arraycollection object, as shown in the following example:
id = "employeeac"
source = "{arrayutil. toarray (employeesrv. lastresult. employees. employee)} "/>