开发者

how we can convert text file into xml format in c# [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何学JAVA Closed 12 years ago.

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:-

  1. Read Text File
  2. Create a class based on your XML structure and also make class serialable by using [serialable] attribute
  3. Split or gather information and put it into the class object.
  4. using XMLSerializer serialize class as XML.

more info :- http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=236

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜