Hi,
Trying to do a simple element add to a XMLList but running into basic
problems.
Has anyone already fixed this?

When I run the example, I get:
<node1/>
<node1/>
<node2/>
<node1/>

when I would expect 
<node1/>
<node1/>
<node2/>
<node1/>
<node2/>

Any idea?

Thanks


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
applicationComplete="init();">
<mx:Script><![CDATA[
private function init():void{
        var xmll:XMLList = new XMLList();
        xmll+=<node1/>;
        trace(xmll.toXMLString());
        addX(xmll);
        trace(xmll.toXMLString());
}
private function addX(x:XMLList):void{
        x+=<node2/>;
        trace(x.toXMLString());
}
]]></mx:Script>
</mx:Application>
-- 
View this message in context: 
http://www.nabble.com/XMLLIst-%2B%3D-operator-problem-tp25577790p25577790.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to