how we can convert text file into xml format in c# [closed]
how we can convert text file into xml format in c#
Many ways, it totally depend upon data format in your text file, AFAIK, you can do that in two ways:-
1.Read Text File 2.Split or gather the information 3.use simple xml tag to write XML files
If you little advance knowledge of XML, you can all use XML serialization to create XML for you, following step would help in same:-
- Read Text File
- Create a class based on your XML structure and also make class serialable by using [serialable] attribute
- Split or gather information and put it into the class object.
- using XMLSerializer serialize class as XML.
more info :- http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=236
精彩评论