Subj : appendChild() with e4x To : netscape.public.mozilla.jseng From : Marco Mariani Date : Thu Aug 25 2005 03:21 am I'm using Deer Park alpha 2, and trying E4X for the first time. The code is as follows: foo = document.getElementById('foo'); // an empty
element foo.innerHTML =
Text
; // works foo.appendChild(
Text
); // doesn't work I'm trying appendChild() because I'd like is to fill a element foo.appendChild(); Firefox replies with Error: [Exception... "Node cannot be inserted at the specified point in the hierarchy" code: "3" nsresult: "0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)" Is this due to missing wrappers between DOM and E4X ? new XML(xmlhttp.responseXML) also doesn't work, but I know it is in the works. Is it possible to achieve what I want? I'd like to avoid losing the events and attributes attached to the element and bar the option list. In this case it strips the tags and attributes from the option list and puts the concatenated text nodes inside foo. Thanks. (enviroment is zope 2.7.5, application/hxtml+xml and DOCTYPE XHTML 1.1) .