title: Best way to change node value with libxml2
body: <p>I want to change the value of a node in a given XML file as template and save the entire XML as another file.</p>
  
  <p>I must use the libxml2 library in a Linux environment and my ideas were:</p>
  
  <ul>
  <li>parse the template file</li>
  <li>when element found modify it</li>
  <li>save the document</li>
  </ul>
  
  <p>Can be this workflow correct?</p>
  
  <p>Are there other way to do this thing with less code?</p>
  
  <p>Any code example will be appreciated.</p>
  
  <p>Thanks!</p>