Subj : Basic E4X, Rhino questions To : netscape.public.mozilla.jseng From : tiwari Date : Wed Jun 22 2005 04:21 pm I embed Rhino in my Java application. Given a Java String containing an XML document, I need to: a) Convert it into Rhino's internal representation (XML or XMLObject?) b) Store it away this representation if needed. c) Assign it to an ECMAScript variable at a later time. I tried searching for samples of hos this is done, but all I could find was one where a String containing an ECMAScript fragment is constructed (e.g.): String sJsCode = "var xml = ... ;"; And the String is evaluated using Rhino. Is there a more elegant way to do this? Something along the lines: org.mozilla.javascript.xml.XML xmlObj = loadXmlFromString(xml); Any help/pointers/reprimands for missing something obvious appreciated. -Raj .