0

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");

?>
2
Contributors
1
Reply
14
Views
3 Years
Discussion Span
Last Post by stultuske
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.