title: XML LINQ transform
body: <p>Trying to achieve the below, basically a flat XML into a hierarchy XML using LINQ...</p>
  
  <p>Any takers? Really stuck here :(</p>
  
  <p>I have an xml document with:</p>
  
  <pre><code>&lt;DriverDetails&gt;
      &lt;Index&gt;0&lt;/Index&gt;
      &lt;DriverTitle&gt;Mr&lt;/DriverTitle&gt;
      &lt;DriverFirstName&gt;Something&lt;/DriverFirstName&gt;
      &lt;DriverSurname&gt;SOMETHING&lt;/DriverSurname&gt;
      &lt;DriverTelephone&gt;01234 123123&lt;/DriverTelephone&gt;
      &lt;DriverMobile /&gt;
      &lt;DriverEmail&gt;something@something.co.uk&lt;/DriverEmail&gt;
      &lt;Index&gt;1&lt;/Index&gt;
      &lt;DriverTitle&gt;Mr&lt;/DriverTitle&gt;
      &lt;DriverFirstName&gt;Something&lt;/DriverFirstName&gt;
      &lt;DriverSurname&gt;Something&lt;/DriverSurname&gt;
      &lt;DriverTelephone&gt;01234 123456&lt;/DriverTelephone&gt;
      &lt;DriverMobile /&gt;
      &lt;DriverEmail&gt;something@something.co.uk&lt;/DriverEmail&gt;
  &lt;/DriverDetails&gt;
  </code></pre>
  
  <p>I’m trying to get this into this XML:</p>
  
  <p>The index being the indentifer of a new set of data</p>
  
  <pre><code>&lt;driverContacts&gt;
      &lt;addressType&gt;Something&lt;/addressType&gt;
      &lt;surname&gt;something&lt;/surname&gt;
      &lt;forename&gt;something&lt;/forename&gt;
      &lt;title&gt;Mr&lt;/title&gt;
      &lt;phoneNo /&gt;
      &lt;mobileNo /&gt;
      &lt;eMail&gt;something@something.co.uk&lt;/eMail&gt;
      &lt;fax /&gt;
  &lt;/driverContacts&gt;
  
  &lt;driverContacts&gt;
      &lt;addressType&gt;Something&lt;/addressType&gt;
      &lt;surname&gt;something&lt;/surname&gt;
      &lt;forename&gt;something&lt;/forename&gt;
      &lt;title&gt;Mr&lt;/title&gt;
      &lt;phoneNo /&gt;
      &lt;mobileNo /&gt;
      &lt;eMail&gt;something@something.co.uk&lt;/eMail&gt;
      &lt;fax /&gt;
  &lt;/driverContacts&gt;
  </code></pre>
  
  <p>So far I've got this:</p>
  
  <pre><code>XElement driverContacts = 
            new XElement("driverContacts",
                  from driverDetails in loaded.Descendants("DriverDetails")
                  select new XElement("driverContacts",
                              new XElement("surname",
                              driverDetails.Element("surname").Value)));
  </code></pre>