$query = mysql_query("SELECT * FROM `biodata` ")or die(mysql_error());

$xml =newSimpleXMLElement(<xml>');
while($data=mysql_fetch_array($query)){
    $biodata = $xml->addChild('biodata');
    $biodata->addChild('nama',$data['nama']);
    $biodata->addChild('alamat',$data['alamat']);
}

Header('Content-type: text/xml');
print($xml->asXML());