<items>
<item label="tom"/>
<item label="asdf">
<item label="efefe"/>
<mx_internal_uid>E4A7C73B-1295-31E9-6978-E772A0407B7F</mx_internal_uid>
</item>
</items>
and the sample code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="init()" xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
private var myXML:XML = <items><item label="tom"/></items>;
[Bindable]
private var xmllc:XMLListCollection;
private function init():void
{
xmllc = new XMLListCollection( new XMLList( myXML.item ) );
}
private function addNode():void
{
var foo:XMLList = new XMLList( <item label="asdf"><item label="efefe"/></item> );
xmllc.addItem( foo );
trace( myXML );
}
]]>
</mx:Script>
<mx:VBox>
<mx:Tree width="200" id="myTree" dataProvider="{xmllc}" labelField="@label"/>
<mx:Button click="addNode()" label="click"/>
</mx:VBox>
</mx:Application>
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___

