Hi,
you need to import the node. Check out the methods on Document.
Gareth
Mannion, Enda wrote:
Hi,
I have two xml documents and I want to copy a node from one document to
another.
This is the portion I want to copy.
*-*
<file:///C:\Program%20Files\Hewlett-Packard\RemoteSupport\data\1234045\metadata1234045.xml##>*-*
<file:///C:\Program%20Files\Hewlett-Packard\RemoteSupport\data\1234045\metadata1234045.xml##>
<annotations>
* * <Annotation timestamp="*15:47:24*">*add this on also*</Annotation>
* * <Annotation timestamp="*15:55:38*">*add this on also*</Annotation>
* * <Annotation timestamp="*16:07:12*">*add this on also*</Annotation>
* * <Annotation timestamp="*18:13:21*">*add this on also*</Annotation>
* *</annotations>
I find the node in one document and store the pointer in a DOMNode* node.
But when I do this I get an exception
newNode->appendChild(node);
I get this exception: WRONG_DOCUMENT_ERR:
I know I am working off two different documents, so can someone suggest
how I go about doing this.
I even tried using the DOMNode* clone = node->cloneNode(true); function
and then appending te new cloned node. But got the same exception.
Enda
--
Gareth Reakes, Managing Director Embrace Mobile
+44-1865-811197 http://www.embracemobile.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]