Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: appendChild & cloneNode >Thread Next - Re: appendChild & cloneNode Re: appendChild & cloneNodeTo: NULL Date: 6/2/2009 1:12:00 PM On Jun 2, 4:01=A0pm, Joe Kesselman <keshlam.cat.nos...@verizon.net> wrote: > >> That still won't work on IE. XML nodes, implemented by MSXML, > >> are a different and incompatible kind of COM component to > >> the HTML nodes implemented in MSHTML :-( > > > That would not necessarily matter as the - importNode - method would > > be able to create new nodes in the target document based upon the > > nodes it received as arguments. Indeed the - importNode - method is > > required to create new nodes rather than directly employing its > > argument nodes. > > Exactly. importNode()'s job is to read the data from the source node > (using the public DOM APIs) and to recreate equivalent nodes in the > target DOM. And it does so poorly (and not at all in IE.) > > > Of course the reason that won't work with IE is that Microsoft DOMs > > (at very lest the HTML DOM that is the target here) does not have the > > - importNode - method implemented. > > ... Which means you have to go back to the solution used before > importNode() was added: Write your own importing subroutine which walks > the source tree and builds equivalent nodes in the target. Easy with > recursion; more difficult but sometimes more efficient with an iterative > engine. It's been done to death. All a waste of time. Use innerHTML or JSON. [snip] | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
