title: Group/merge childs of same nodes in xml/xslt
body: <p>I am new to XSLT and changing it manually will take a lot of time.</p>
  
  <pre><code>&lt;GroupData ID="xxx" Key="4" Temp="yyy"&gt;
   &lt;ItemData ID="zzz" Value="3"/&gt;
  &lt;/GroupData&gt;
  
  &lt;GroupData ID="xxx" Key="4" Temp="yyy"&gt;
   &lt;ItemData ID="www" Value="1982"/&gt;
  &lt;/GroupData&gt;
  </code></pre>
  
  <p>I want to have the childs of these multiple GroupData nodes within the same group, i.e.,</p>
  
  <pre><code>&lt;GroupData ID="xxx" Key="4" Temp="yyy"&gt;
   &lt;ItemData ID="zzz" Value="3"/&gt;
   &lt;ItemData ID="www" Value="1982"/&gt;
  &lt;/GroupData&gt;
  </code></pre>
  
  <p>So I need to merge/combine/match them on both GroupData's ID and Key attributes (these vary within the file). Also some do not have a Key attribute. How can I do that? I read some other threads (for example, in C# but I don't have that at my disposal) and I checked W3 schools but these are very basic examples. I am using the latest XML Tools 2.3.2 r908 unicode (beta4) for Notepad++ to apply possible transformations (do not know whether it supports XSLT2.0 or XSLT1.0).</p>
  
  <p>Edit: After trying the suggestions below and various things I am stuck since it has multiple levels and possiblly does not have unique IDs:
      
          
              
              
              
                          
                              
                          
                      
                      
                          ...
                      <br>
                  
              
          <br>
              </p>