Hello Friends, I am Nikunj R Satasiya.and Tody I dedicate How Parse XML Using Regular Expressions in Asp.net with C#.
I got good solution for
Need to just call this function with parameters XML string, XML element name and default value if value not find into XML string.
private String ExtractContentFromXml(String xml, String element, String defaultValue)
{
String RegExpression = String.Format(@"(?<={0}>)[\S\s]*?(?=\<\/{0})", element);
if (ThisMatch.Success)
return ThisMatch.Value;
else
return defaultValue;
}
I hope you will enjoy this solution...
ConversionConversion EmoticonEmoticon