Subj : Embedding E4X support with SpiderMonkey To : netscape.public.mozilla.jseng From : Peter Wilson Date : Wed May 04 2005 02:02 pm I've used SpiderMonkey quite extensively in our Whitebeam server (http://www.whitebeam.org) over the last 5 years, including integrating it with my own XML/Xpath implementations in the server. I've just taken a look at the E4X spec, and realised it's implemented in the latest CVS tree for SpiderMonkey. A lot of the functions mirror standard Whitebeam features (whch didn't need any language enhancements, so not sure they are required). I've just integrated the latest CVS tree into Whitebeam, and I seem to have the core XML/XMLlist classes etc - but don't seem to be able to do much with them. For example: new XML('') claims an XML syntax error, possibly down to the XML namespace being unsupported. One thing missing I think is the required modified global object. JS_InitStandardClasses doesn't seem to bind the new XML globals to my global object (although it does bind things like parseInt etc), and I can't for the life of me how to work out how to create an instance of XML to use as the global object, or even if that's the right appproach. A pointer to some documentation would be great Hints/tips from anyone that has integrated E4X support into another environment would be great Comments on the impact of (probably) having *another* XML engine in my app-server also welcome. Are there any hooks that I can use to integrate E4X with my own DOM-like tree/Xpath implementation rather than having code parsed multiple times? Where do I start? One other point - unrelated - is their a target date for another 'official' SpiderMonkey release? The last was back in June last year and lots seems to have happened since then including a lot of good fixes. thanks in advance Pete -- Peter Wilson T: 01707 891840 M: 07796 656566 http://www.yellowhawk.co.uk ------------------------------------------------------------------------ .