is that the first forces the XML constructor to parse every part of the String, looking for XML code. The second statement treats thevar xml:XML = new XML('
<
root
>
' + o.data + '
<
/root
>
');
var xml:XML =<
root
>
{o.data}
<
/root
>
;
{var}
as a simple data value, so potential XML code inside it will be escaped (that is, something like <tag>
will become <tag>
).o.data
should be considered as a complex XML value, use the XML constructor. Otherwise, you can use the fancy shortcut.Etiquetas: actionscript, xml