You need to import your node into the new document.

xmldoc.importNode(node);

There might be another parameter you need to pass.  It's in the Javadocs.

Scott

----- Original Message ----- 
From: "tom john" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 08, 2001 6:14 AM
Subject: creating new document from a node


> Hi,
> I need to create a new xml document of a node got from
> a big xml document. 
> I use:
> 
> node - node from another document
> 
> Document xmldoc = new DocumentImpl();
> 
> xmldoc.appendChild(node);
> 
> this code compiles but gives runtime error.
>  will be greateful if anyone can help
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Find a job, post your resume.
> http://careers.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to