title: oracle 11g PLSQL append xml document as child to another xml document
body: <p>For several days I'm trying to find a solution to my problem, and so far no luck.
  Maybe someone can help me.
  Here is a piece of my code </p>
  
  <pre><code>doc DBMS_XMLDOM.DOMDocument;
  doc := DBMS_XMLDOM.newDOMDocument;
  DBMS_XMLDOM.setVersion(doc, '1.0');
  DBMS_XMLDOM.setcharset(doc, 'ISO-8859-15');
  root := DBMS_XMLDOM.makeNode(doc);
  root := DBMS_XMLDOM.appendChild(root, DBMS_XMLDOM.makeNode(DBMS_XMLDOM.createElement(doc, 'toto')));
  </code></pre>
  
  <p>All above is working.
  The following piece of code works on Oracle 9g but not on 11g and I'm trying to find the solution to be able to make it work:</p>
  
  <pre><code> xml := XMLTYPE.EXTRACT(lr.FIELD_XML, '/description/test');//from a table
   childDoc := DBMS_XMLDOM.newDOMDocument(xml);
   childRoot := DBMS_XMLDOM.makeNode(DBMS_XMLDOM.getDocumentElement(childDoc));
   node := DBMS_XMLDOM.appendChild(productNode, childRoot); --it fails here 
  </code></pre>
  
  <p>I've looked up on the Internet and it fails because I cannot append as a child a xml document to another xml document.
  I should replace the <code>appendChild</code> but I don't know how .</p>
  
  <p>So, here is my question: anyone any idea how to solve this.</p>
  
  <p>Thanks alot.</p>
  
  <p>C.C.</p>