BExIS.Web.Shell.Areas.DDM.Helpers.helper.GetElementsByAttribute C# (CSharp) Метод

GetElementsByAttribute() публичный статический Метод

Create a list of Parents nodes from an XML document
public static GetElementsByAttribute ( System.Xml.Linq.XDocument xDoc, string attribute, string value ) : IEnumerable
xDoc System.Xml.Linq.XDocument An XML Document
attribute string Description of a node
value string Value that is searching
Результат IEnumerable
        public static IEnumerable<XElement> GetElementsByAttribute(XDocument xDoc, string attribute, string value)
        {
            IEnumerable<XElement> list;
            list = xDoc.Root.Descendants().Where(e => e.Attribute(attribute).Value.Equals(value));

            return list;
        }

Same methods

helper::GetElementsByAttribute ( System.Xml.Linq.XElement element, string attribute, string value ) : IEnumerable