To integrate our data base with other site, I've got a xml coding (given below) but they require a JSP output steps and tips to achive that would be appriciated. TIA.

<?php include('db_connect.php');?>
<?php $query=mysql_query("select * from tbl_seat")or die(mysql_error()); 
$xml="<libraray>\n\t\t";
while($data=mysql_fetch_array($query))
{

    $xml .= "<From>".$data['fromloc']."</From>\n\t\t";
    $xml .= "<To>".$data['toloc']."</To>\n\t\t";
    $xml .= "<Date_of_Journey>".$data['date']."</Date_of_Journey>\n\t\t";
    $xml .= "<Bustype>".$data['bustype']."</Bustype>\n\t\t";
    $xml .= "<Boarding_point>".$data['boarding']."</Boarding_point>\n\t\t";
    $xml .= "<Dropping_point>".$data['dropping']."</Dropping_point>\n\t\t";
    $xml .= "<Seats>".$data['seats']."</Seats>\n\t\t";
    $xml .= "<Fare>".$data['fare']."</Fare>\n\t\t";

}
$xml.="</libraray>\n\r";
$xmlobj=new SimpleXMLElement($xml);
$xmlobj->asXML("saffari.xml");

?>