Wednesday, 27 May 2015

read xml attribute value c#

Due to get some Values from HTML or for XML there we need to Read XML Attributes Values from given string in C#.

There is the sample code below; which is using System.Xml.Linq.
which will help you to over come this problem. and read the XML attribute value through c#


Suppose you have the XML attributes as below; There we are finding the description from Given attributes.

string str = @"<label description='My Button Text' languagecode='5001' />";