CSharp examples for System.Xml:XML Element
Get XML Attribute Value from XElement
using System.Xml.Linq; using System;/*from w w w.j a v a2s . c om*/ public class Main{ public static string GetAttrValue(this XElement elem, string attrName) { return elem.Attribute(attrName)?.Value; } }