title: Remove line from XML with QDomDocument
body: <p>Im working with XML files in Qt, and i need to copy an XML file and then append to the copy. One issue im having is i need to delete the very last line of the XML file which is: </p>
  
  <pre><code>&lt;/VSCommands&gt;
  </code></pre>
  
  <p>I am very new to working with XMLs in Qt and using QDom, so im here asking for help on what is the best way to approach copying the xml file, and deleting that last line, then appending my new data to the end of the file?</p>
  
  <p>Edit: 
  I have copied the original xml to a new xml using:</p>
  
  <pre><code>QFile readFile(filename);
  readFile.copy(new_filename);
  QFile writeFile(new_filename);
  </code></pre>
  
  <p>And now i have opened it to append onto the file with:</p>
  
  <pre><code>if (writeFile.open(QIODevice::Append))
  {
  
  }
  </code></pre>
  
  <p>I am just unsure of how to delete the last line of the file first, before i begin to append the new data. </p>