AnsweredAssumed Answered

ECMAScript for XML (e4x) in Alfresco

Question asked by randomman on Nov 2, 2007
Latest reply on Feb 25, 2008 by pmonks
I was thinking it'd be quite handy to manipulate XML in an alfresco script. After a quick google moment I discovered E4X.

That looked pretty cool and it turns out it's supported by Rhino 1.6! But not the 1.6 in Alfresco 2.1, unfortunately - that's R4. What you need is R7. All you need to do is download the R7 jar and stick in your lib directory, restart Alfresco (not sure if that's necessary, but i did it anyway) and hey presto, you're in xml country!

Here's my easy step-by-step guide:

1. Download from here.
2. Unpack it and rename js.jar to rhino-js-1.6R7.jar so it's easier to see what it is.
3. Copy it into alfresco/tomcat/webapps/alfresco/WEB-INF/lib or whatever your equivalent directory is.
4. Restart Alfresco.

There's some documentation here  and a quick tutorial on W3 Schools. There's also examples in that Zip you download from

It seems quite neat. Is there any plan to include this newer release in future Alfresco builds (if it's not already)?