split the string data and build a xml string by using linq to xml format in c#

zvitus

New Member
trying the split the string data and build into xml format using linq to xml,but i am facing some difficulities to generate a xml string\[code\]mystring = {1:abcd}{2:efgh}{3:/r/n:12:mmm/r/n:65:nnn}\[/code\]required output :\[code\]<MESSAGE><BLOCK1><VALUE>abcd</VALUE></BLOCK1><BLOCK2><VALUE>efgh</VALUE></BLOCK2><BLOCK3><TAG>12</TAG><VALUE>mmm</VALUE><TAG>65</TAG><VALUE>nnn</VALUE></BLOCK3></MESSAGE>\[/code\]Kindly advice on the above same
 
Back
Top