If you have an XmlDocument and you want’t to query it with linq, you first have to convert the XmlDocument to an XDocument:

// Convert XmlDocument to XDocument
XmlDocument xmlDocument = new XmlDocument();
XDocument xDocument = XDocument.Parse(xmlDocument.OuterXml);

// Convert XDocument to XmlDocument

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.