CSharp examples for System.Xml:XML Element
XML Element Any Namespace
using System.Xml.Linq; using System.Linq; public class Main{ public static XElement ElementAnyNamespace(this XContainer root, string localName) {//from ww w . ja v a 2s .c o m return root.Elements().FirstOrDefault(e => e.Name.LocalName == localName); } }