> The implementation of E4X is based on XMLBeans, > http://xmlbeans.apache.org/. After having browsed the Rhino source > http://lxr.mozilla.org/mozilla/source/js/rhino/, I get the impression > that objects in the XML (whithin Rhino) class both can be constructed on > and return its internal o.a.xmlbeans.XmlObject. If this is true have a > lot of flexiblity.
If you have an instance of org.apache.xmlbeans.XmlObject you can pass it to XML constructor to get E4X wrapper around it. To get XmlObject from E4X wrapper use getXmlObject of E4X objects. Note that was added after RC3 for Rhino 1.6 which is what effectively in cocoondev svn repository. So one can have:
var xmlObject = Packages.org.apache.xmlbeans.XmlObject.Factory.parse(....)
var xml = XML(xmlObject);
[EMAIL PROTECTED] = value
var xmlObject2 = xml.getXmlObject();
// Must print true java.lang.System.out.println(xmlObject === xmlObject2);
Regards, Igor
