I have to pass a whole XML document into a 3rd party function. The parameter is XmlElement
.
To do this until now, I've successfully been using this:
XmlDocument doc;
//doc = ...
XmlElement root = doc.DocumentElement;
3rdPartyFunction(root);
But now I'm using XDocument
instead of XmlDocument
:
XDocument doc;
//doc = ...
//how to call 3rdPartyFunction?
How do I call the function in this case? Can I convert from "Xml" to "X"?