Skip to content

Instantly share code, notes, and snippets.

@emrul
Forked from tuchida/E4X.java
Last active August 29, 2015 14:18
Show Gist options
  • Save emrul/ed40401a52299c9d4cfb to your computer and use it in GitHub Desktop.
Save emrul/ed40401a52299c9d4cfb to your computer and use it in GitHub Desktop.
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class E4X {
public static void main(String[] args) {
System.out.println("E4X: " + System.getProperty("nashorn.lexer.xmlliterals"));
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("js");
try {
engine.eval("<xml>xml</xml>");
} catch (Exception e) {
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment