--- Naveen Srinivasa Murthy <[EMAIL PROTECTED]>
wrote:
> Hi friends,
> 
> my problem space is such that i need to pick up DOM
> nodes from
> 2 different xml docs and use them to create a new
> xml document.
> 
> I am succesful in parsing the 2 input xmls and
> extracting
> the nodes. but when i create the resultant document
> and i try to make these extracted nodes as child
> nodes of
> the new document and serialize it, I get an error. I
> get an
> InstantiationException.
> 
> should i always build new nodes to construct an xml
> doc thro DOM?
> is it not possible to use already extracted nodes
> from other docs
>  to make a new xml doc using dom?
> 
> any sample code/ suggestion is welcome
> 
> Thanks in advance,
> Naveen
> 

Naveen,

You can use the nodes, but before they can be added
they must be imported.  To do this call importNode( )
on your new document.  I'm in a hurry to get out the
door or I'd post some sample code.  Read about
importNode( ) and you should be all set.  Hope this
helps.

-Jason

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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

Reply via email to