Hi,
I am a bit puzzled by the XMLList operator +=.
I created the following small test code:
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());
}
and I was expecting to see:
<node1/>
<node1/>
<node2/>
<node1/>
<node2/>
but instead I saw :
<node1/>
<node1/>
<node2/>
<node1/>
i.e., the += seems to create a new instance of the XMLList, it doesn't update
the current one.
Can anyone confirm?
Thanks