On Mon, Jan 4, 2016 at 11:17 AM, Harbs <harbs.li...@gmail.com> wrote:
> For literals, yes, we’d for the most part just pass the whole thing as a > string to the constructor. The only exception I can think of is bracket > notation: > > var foo:XML = <node><subnode attr={myAttr}>foo</subnode></node>; > would have to become: > var foo:XML = new XML('<node><subnode > attr="‘+myAttr+’">foo</subnode></node>’); > > Wrapping the xml in a dummy node is a good idea. I like that. Thanks! > Another thing you may want to consider is the new back-tick quotes (` `) in ES6: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings