public static class XDocumentExtensions
{
/// <summary>
/// Saves the contents of an XDocument object into a XmlDocument object
/// </summary>
/// <param name="xDocument">Source document</param>
/// <returns>Destination document</returns>
public static XmlDocument GetXmlDocument(this XDocument xDocument) {
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(xDocument.CreateReader());
return xmlDocument;
}
}
Share this Post: