No. That’s not it.
For example, this:
var e = <employees>
<employee id="1"><name>Joe</name><age>20</age></employee>
<employee id="2"><name>Sue</name><age>30</age></employee>
</employees>;
// append employees 3 and 4 to the end of the employee list
var newE:XMLList = new XMLList();
newE[0] = <employee id="3"><name>Fred</name></employee>;
newE[1] = <employee id="4"><name>Carol</name></employee>;
e.employee += newE;
trace(e);
outputs:
<employees>
<employee id="1">
<name>Joe</name>
<age>20</age>
</employee>
<employee id="2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id="3">
<name>Fred</name>
</employee>
<employee id="4">
<name>Carol</name>
</employee>
</employees>
There’s something about the XML in my test case which is preventing the
appending of either XML or XMLList to the original XML object. It feels to me
like a bug in Flash…
On May 6, 2016, at 10:06 AM, Alex Harui <[email protected]> wrote:
> Well, the spec is checking to see if the thing appended is an XMLList and
> in the above example, I think you are appending XML not XMLList so that
> might explain the different behavior.