Apache NiFi has an ExecuteScript processor with ECMAScript as one of the possible script engines. But even with Rhino JAR in NiFi /lib folder I still cannot create an XML object as any E4X example suggests. (PS. DOM, etc. are not the options.)
To begin with org.mozilla.javascript.xmlimpl.XML is not a public class, but even then it seems to be called as org.mozilla.javascript.xmlimpl.XML.jsConstructor() under the hood.
Any idea how to add E4X support to ECMAScript NiFi?
I'm not sure if it's possible. Even the idea of adding support directly to Nashorn got no love from the OpenJDK folks.