Officially, the DOM doesn't currently allow you to replace the document
element. (DOM Level 3 may relax that restriction), which makes this a bit
more complicated if you want a fully portable solution. There may also be
children of the Document other than the root element which would need to be
imported and inserted in the right places. And starting with a
DocumentFragment or NodeList, because it may not have a single root
element, also needs a bit of secial-casing.

This is a bit more code than I really want to rattle off right now, I'm
afraid.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to