title: Transforming one XML document into another with C++
body: <p>What would be a straightforward way to transform a source XML document into a destination XML document. There are only small differences between source and destination: Specifically I want to delete the first <code>UnitIDRecord</code>-Node within each <code>UnitIDGroup</code>-Node.</p>
  
  <ul>
  <li>What would be the appropriate model for this task DOM or SAX?</li>
  <li>What XML-library would best fit this problem (which guarantees that the source and destination only differs in the deleted nodes, no missing namespace, attributes, encoding, ...)?</li>
  <li>I read about <code>XSLT</code>, could this be an option?</li>
  </ul>
  
  <p>The XML document looks like following:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ExPostInformationRealGeneration xmlns="http://schemas.seven2one.de/EEX/TransparencyPlatform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.seven2one.de/EEX/TransparencyPlatform EEXTransparencyPlatform.xsd"&gt;
      &lt;DispatcherID&gt;XYZ&lt;/DispatcherID&gt;
      &lt;CreationDateTime&gt;2012-05-22T13:57:00Z&lt;/CreationDateTime&gt;
      &lt;MessageText&gt;1 - Positiv - Meldung mit Quality-Tag - L000&lt;/MessageText&gt;
      &lt;UnitIDGroup&gt;
          &lt;UnitID&gt;E110200-001&lt;/UnitID&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;16.9&lt;/Quantity&gt;&lt;Starttime&gt;2008-04-30T22:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;16.6&lt;/Quantity&gt;&lt;Starttime&gt;2008-04-30T23:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;16.4&lt;/Quantity&gt;&lt;Starttime&gt;2008-05-01T00:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
      &lt;/UnitIDGroup&gt;
      &lt;UnitIDGroup&gt;
          &lt;UnitID&gt;E110200-002&lt;/UnitID&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;16.9&lt;/Quantity&gt;&lt;Starttime&gt;2008-04-30T22:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;16.6&lt;/Quantity&gt;&lt;Starttime&gt;2008-04-30T23:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;16.4&lt;/Quantity&gt;&lt;Starttime&gt;2008-05-01T00:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
      &lt;/UnitIDGroup&gt;
      &lt;UnitIDGroup&gt;
          &lt;UnitID&gt;E110201-001&lt;/UnitID&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;7.0&lt;/Quantity&gt;&lt;Starttime&gt;2008-04-30T22:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;7.1&lt;/Quantity&gt;&lt;Starttime&gt;2008-04-30T23:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
          &lt;UnitIDRecord&gt;&lt;Quantity&gt;7.1&lt;/Quantity&gt;&lt;Starttime&gt;2008-05-01T00:00:00Z&lt;/Starttime&gt;&lt;Period&gt;PT1H&lt;/Period&gt;&lt;MessageText&gt;&lt;/MessageText&gt;&lt;/UnitIDRecord&gt;
      &lt;/UnitIDGroup&gt;
      &lt;!-- other UnitIDGroup elements --&gt;
  &lt;/ExPostInformationRealGeneration&gt;
  </code></pre>