Recently i faced a problem where i needed to get the InnerXml and the OuterXml of an XElement object. The solution was easy to find on the InnerXMl method but the OuterXml method was a bit harder. Here is what i have done.

More...