text file to xml

Jan 30 2014 7:44 AM
Hi :) I have a file containing text such as
TestG
{
  RandomLine
  AnotherRandomLine
  GuessWhat.Again.ALINE
}

TestG.Random
{
  Patati
  Patata
}

And I want to convert it to a xml file like
<Function name="TestG">
 <item>RandomLine</item>
 <item>AnotherRandomLine</item>
 <item>GuessWhat.Again.ALINE</item>
</Function>
<Function name="TestG.Random">
 <item>Patati</item>
 <item>Patata</item>
</Function>
 I hope it will be possible :) Thank you

EDIT:
I loaded the text file and made a list out of it.
I really don't know what to do now :/

Answers (1)