How to convert a .txt file to a .xml file
Just rename the .txt file to .xml file if all you want is an xml file. However, if you are interested in transforming the .txt file to a meaningful xml file, you have to break the information in the .txt file and organize it accrodingly.
For example, if you .txt file is like
- Sachin Tendulkar,Cricket,Batsman,India
- Andrea Prilo, Football, Midfielder, Italy
Then your xml might look like
- <?xml version="1.0" encoding="UTF-8"?>
- Sachin Tendulkar
- Cricket
- Batsman
- India
- Andrea Pirlo
- Football
- Midfielder
- Italy
This is how it is supposed to look in xml. So, you can use your language of interest and use the output statements to print/fill the .xml file appropriately.