HI,
Is there any 'correct' way to convert an XElement to an XmlNode in C# - LinqToXML makes it nice to build the required XML programmatically but SharePoint web services requires an XmlNode, so whats the best way to mix and match?
HI,
Is there any 'correct' way to convert an XElement to an XmlNode in C# - LinqToXML makes it nice to build the required XML programmatically but SharePoint web services requires an XmlNode, so whats the best way to mix and match?
Use CreateReader() and an XmlDocument like
XmlDocument myXmlNode = new XmlDocument();
using (XmlReader reader = myXElement.CreateReader())
{
myXmlNode.Load(reader);
}
XmlDocument derives from XmlNode.