Saving form data into xml using php

hi,
i have form with few text fields, When i submit the form the data should for an xml file. i am not sure how to do this.

<form action="xml.php" name="data" method="post">
Name:<input type="text" name="ename" id="ename" />
Age: <input type="text" name="age" id="age" />
<input type="submit" value="submit" name="submit" />
</form>

when i submit the above formit should create an .xml file
<?xml version=“1.0” encoding=“ISO-8859-1” ?>
<data>
<name>sukanya</name>
<age>26</age>
</data>
if the posted data for name is sukanya and age is 26
can some1 help i’m tryin to find for quite a while but not able to