public static XElement GetReferenceTarget(this XElement element) { var referenceAttribute = element.Attribute(ReferenceAttributeName); return referenceAttribute == null ? null : XPathHelper.GetElement(element, referenceAttribute.Value); }