This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > February 2005 > Copy a node from a document to another under MSXML 4.0.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Copy a node from a document to another under MSXML 4.0.
|
|
| Natalio Elta 2005-02-24, 6:38 pm |
|
Hi,
I'm using the DOM XML in ASP/VBScript and I'm trying to copy a node from one
document to another.
I browsed through the MSDN documentation and I now understand that the
method to do this is importNode. However, this was not implemented before
MSXML 5.0. and my server has version 4.0.
Has anyone an idea as to how to achieve this through another method?
Thanks very much in advance for your help.
Natalio Elta
| |
| Martin Honnen 2005-02-24, 6:38 pm |
|
Natalio Elta wrote:
> I'm using the DOM XML in ASP/VBScript and I'm trying to copy a node from one
> document to another.
> I browsed through the MSDN documentation and I now understand that the
> method to do this is importNode. However, this was not implemented before
> MSXML 5.0. and my server has version 4.0.
> Has anyone an idea as to how to achieve this through another method?
With MSXML 4 you can simply move the node from one document to the other
by calling
someNodeInDocument1.appendChild(someNodeInDocument2)
for instance, or if you want to copy do
someNodeInDocument1.appendChild(someNodeInDocument2.cloneNode(true))
for instance, of course other methods like insertBefore work also.
--
Martin Honnen
http://JavaScript.FAQTs.com/
| |
| Natalio Elta 2005-02-25, 7:25 am |
| That sounds rather logical, Martin. Thanks a lot, really!
Natalio
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|