Convert text file to xml using c#
I have a .txt file and i want to convert it into .xml file using c#. The txt file looks like
This is my C# code
while executing this i am getting an output as
but my expected output is
thanks in advance
- Moved by Dave Patrick MVP Thursday, October 16, 2014 1:11 AM
According to your code, you can use String.Split Method (Char[]) separated by ' =' .
So change code like the following
Have a nice day!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- Proposed as answer by Doanh, Qh Thursday, October 16, 2014 7:03 AM
- Marked as answer by Kristin Xie Moderator Wednesday, October 22, 2014 10:01 AM
You can try to rewrite your code as below and it will give the same result.
Hope above help.
- Marked as answer by Kristin Xie Moderator Wednesday, October 22, 2014 10:01 AM
All replies
According to your code, you can use String.Split Method (Char[]) separated by ' =' .
So change code like the following
Have a nice day!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- Proposed as answer by Doanh, Qh Thursday, October 16, 2014 7:03 AM
- Marked as answer by Kristin Xie Moderator Wednesday, October 22, 2014 10:01 AM
You can try to rewrite your code as below and it will give the same result.
Hope above help.
- Marked as answer by Kristin Xie Moderator Wednesday, October 22, 2014 10:01 AM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.