CSharp examples for System.Xml:XML Attribute
Get String Elem
using System.Xml.Linq; using System;/* ww w . ja va 2s . co m*/ public class Main{ public static string GetStringElem(this XElement elem, string name) { return elem.GetElemValue(name); } public static string GetElemValue(this XElement elem, string elemName) { return elem.Element(elemName)?.Value; } }