You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Mohana Ramaratnam <mo...@npg.wustl.edu> on 2006/07/14 18:48:33 UTC

Dom replaceChild question

Hello,

 

I have javabeans representing a schema S. I want to generate an XML
document A which is a copy of Schema_S_instance_doc.xml with the
contents of a node changed to another  node (this replacement makes the
new doc invalid wrt to schema). 

 

A.xml neednt be valid wrt to Schema S. 

 

If I use javabeanObject.getNode.replaceChild then I am getting an error 

 

org.apache.xmlbeans.impl.store.DomImpl$WrongDocumentErr: Child to
replace is from another document

 

How can I avoid this situation. Its ok for my copy xml to be invalid.