title: copy node xml to another xml
body: <p>I would like to copy a node of a xml to another xml.
  I have created the two DOM of the xml and when i find the node i need i try this code</p>
  
  <pre><code>NodeList elementi = doc.getChildNodes();
  for (int i = 0; i &lt; elementi.getLength(); i++){
      NodeList datiTitolo = elementi.item(i).getChildNodes();
      for (int j = 0; j &lt; datiTitolo.getLength(); j++){
          if(datiTitolo.item(j).getFirstChild().getTextContent().equals("cariplo")){
              buy.importNode(datiTitolo.item(j), true);
              System.out.println("Fatto");
              break;
          }
      }
  }
  </code></pre>
  
  <p>but seems to do nothing.. when i write into the file nothing appaer
  where is the error?</p>