Last active
August 29, 2015 14:26
-
-
Save apb2006/f5d3ce9488897e245b3b to your computer and use it in GitHub Desktop.
Java8 XQuery Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: Java8 XQuery Javascript :) | |
declare namespace se="java:javax.script.ScriptEngine"; | |
declare namespace sm="java:javax.script.ScriptEngineManager"; | |
let $engine:= sm:getEngineByName(sm:new(),"nashorn") | |
return ( | |
se:put($engine,"a","This string is encoded!"), | |
se:eval($engine,"escape(a)") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.java2s.com/Tutorial/Java/0120__Development/RunningScriptswithJavaScriptEngine.htm
http://stackoverflow.com/questions/22017086/how-to-debug-javascript-in-nashhorn-jdk-8-in-netbeans
http://stackoverflow.com/questions/12973386/javax-script-package-how-to-import-javascript-files