 <p>If your format is fixed like this, it's not so bad:</p> <pre><code>foreach(XElement element in elements) { XDocument newDoc = new XDocument (new XElement(xDoc.Root.Name, xDoc.Root.Element("Info"), element)); // ... } </code></pre> <p>It's not great, but it's not horrendous. An alternative is to clone the original document, remove all the Message elements, then repeatedly clone the "gutted" version and add one element at a time to the new clone:</p> <pre><code>XDocument gutted = new XDocument(xDoc); gutted.Descendants(xDoc.Root.Name.Namespace + "Message").Remove(); foreach(XElement element in elements) { XDocument newDoc = new XDocument(gutted); newDoc.Root.Add(element); // ... } </code></pre>