Get the XPath to an XElement?

The extensions methods: public static class XExtensions { /// <summary> /// Get the absolute XPath to a given XElement /// (e.g. “/people/person[6]/name[1]/last[1]”). /// </summary> public static string GetAbsoluteXPath(this XElement element) { if (element == null) { throw new ArgumentNullException(“element”); } Func<XElement, string> relativeXPath = e => { int index = e.IndexPosition(); string name = e.Name.LocalName; … Read more

techhipbettruvabetnorabahisbahis forumu