Please explain me what is the difference between XML and XMLList and XMLListCollection. If possible in simple words with example. Thanks in advance.
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
Secondly, I'd say check the Examples
link for XMLList as that gives a good working example between the difference of XML and XMLList.
Use XML when you want to create a variable with a value of an XML document.
var mybooks:XML = <books>
<book>
<title>Book1</title>
</book>
<book>
<title>Book2</title>
</book>
</books>;
Use XMLList to create subsets of data from an XML variable.
var mybookTitles:XMLList = mybooks.title;
Finally, an XMLListCollection class is basically a helper class for taking your XML or XMLList object and using it in a control.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With