javascriptnode.jshtml-parsinge4xspidermonkey

E4X with NodeJS


Is there any way to get E4X(ECMAScript) to work with NodeJS?

It would really help to output slick html/xml without hassle/noise.

It works fine using SpiderMonkey since it is natively implemented, but it doesn't seem to work with NodeJS.

using node

$node
> var name = "World";
> var p = <p>Hello {name}</p>;
...

using spidermonkey

$js
js> var name = "World";
js> var p = <p>Hello {name}</p>;
Hello World
js>

thanks in advance


Solution

  • Node uses V8, which does not implement E4X as of now.

    There's a 2 year old issue, but still active issue on the topic. But it has no real "status" nor was it assigned to anyone.

    So in short: The answer is no.