Ian Collins wrote:[color=blue]
> Is there a way to do this in IE?
>
> In Firefox, one can simply append a node from an XML return to the
> current document. IE whinges about 'No such interface supported'[/color]
Note that according to the W3C DOM you should not simply move nodes from
one document to the other but rather use importNode e.g.
someNode.appendChild(
someNode.ownerDocument.importNode(
nodeFromSecondDocument,
true
)
)
Mozilla allows you to get away without using importNode but Opera
requires that and is closer to the W3C specification that way.
As for IE, no, the XML DOM in IE is not implemented by IE itself but
rather the COM component MSXML and you can't move or import nodes
between the HTML DOM that IE (or internally MSHTML) implements and the
XML DOM that MSXML implements.
You would have to write your own importNode that walks the XML DOM tree
and then recreates nodes in the HTML DOM using document.createElement
and other node creating methods.
Or you let the HTML parser of IE do its work by feeding responseText to
innerHTML of an HTML element for instance.
--
Martin Honnen
http://JavaScript.FAQTs.com/