title: Get the XPath to an XElement?
body: <p>I've got an XElement deep within a document. Given the XElement (and XDocument?), is there an extension method to get its full (i.e. absolute, e.g. <code>/root/item/element/child</code>) XPath?</p>
  
  <p>E.g. myXElement.GetXPath()?</p>
  
  <p><strong>EDIT:
  Okay, looks like I overlooked something very important. Whoops! The index of the element needs to be taken into account. See my last answer for the proposed corrected solution.</strong></p>