Um... define "text file" and "xml format"...
xml is syntactically very similar to html, except you can defined your own tags. What is the information in the text file you wish to have in XML?
I'm going to assume you have the data in some kind of datatable style format in your text file - maybe csv or something... hopefully the first line has headers.
In this case, just Google "load datatable from CSV". Once you have the data in a datatable you can just save the data out to an XML file using:
Assuming you've successfully done this and you've created a DataTable called "MyDataTable", use the WriteXml method to save the data out to an XML file:
C#
- MyDataTable.WriteXml("MyOutputFile.xml");
VB
- MyDataTable.WriteXml("MyOutputFile.xml")