I have found a lot of answer on this question, but they are all trying to convert the string first into file and then trying to parse it using XmlDocument doc = new XmlDocument();
I am newbie in c#
. Format of my string is :
<a header = '0'> < row dc = '123' al = '45' msg = '1-st line'/> < row dc = '678' al = '8' msg = 'second-line'/> </a>
I am trying to write the pseudo code to parse it :
IF <a header> == 0
Then read from the second line to last line i.e. dc = 678 , al = 8, msg = second-line
ELSE read from the first line to last line i.e.
dc = 123 , al = 45, msg = 1-st line
dc = 678 , al = 8, msg = second-line
After this i have to insert into database. While applying the above condition what will be appropriate solution to this?