public static string getResourceXPathName(string elementXPath, string elementValue, System.Xml.Linq.XElement xElement) { try { return(Convert.ToString(xElement.XPathSelectElement(elementXPath).Elements().Where(x => x.Value == elementValue).SingleOrDefault().Name)); } catch (Exception) { return(string.Empty); } }
public static string getResourceXPathAttribute(string elementXPath, string attributeName, System.Xml.Linq.XElement xElement) { try { return(Convert.ToString(xElement.XPathSelectElement(elementXPath).Attribute(attributeName).Value)); } catch (Exception) { return(string.Empty); } }
public static string getResourceXPathString(string elementXPath, System.Xml.Linq.XElement xElement) { try { return(Convert.ToString(xElement.XPathSelectElement(elementXPath).Value)); } catch (Exception ex) { return(string.Empty); } }