I know there is no direct method of doing it but still..
Can we convert XElement
element into XmlNode
.
Options like InnerText
and
Here is converting from string to XElement to XmlNode and back to XElement. ToString() on XElement is similar to OuterXml on XmlNode.
XElement xE = XElement.Parse(" ");
XmlDocument xD = new XmlDocument();
xD.LoadXml(xE.ToString());
XmlNode xN = xD.FirstChild;
XElement xE2 = XElement.Parse(xN.OuterXml);