简体   繁体   中英

Convert Text file to XML

I need to convert text file to XML file through C# application. Can any one provide me sample code.

You have not provided enough information to receive an answer.

What format is the text file?
What kind of XML do you want?



Unless you provide more information, here is the correct answer:

File.Move(@"C:\File.txt", @"C:\File.xml");

try this way:

File.Move("CurrentFileDirectory","NewFileDirectory");

CurrentFileDirectory = @"C:\Documents\YourFile.Text";

NewFileDirectory = @"c:\Documents\Yourfile.XML";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM