<?php
require_once "db1.php";
if($conn){
echo "<p>Connected to Database Successfully</p>";
} elseif(isset($error)){
echo "<p>$error</p>";
}
?>
<?php
$sql = "SELECT SLNO,FIO,SEX,TITLE,LATFIO,ACCOUNT,ACCOUNTTP,ACCTSTAT,ADDRESS,ZIPLIVE,CORADDRESS,ZIPCONT,RESADDRESS,ZIPREG,CNTRYREG,
CNTRYCONT,CNTRYLIVE,CELLPHONE,PHONE,BIRTHDAY,BRPART,EMAIL,FATHER,MOTHER from qcash";
$res = mysql_query($sql);
$xml = new XMLWriter();
$xml->openMemory();
$xml->startDocument();
$xml->setIndent(true);
$xml->startElement('qcash');
while ($row = mysql_fetch_assoc($res)) {
$xml->startElement("SLNO");
$xml->writeAttribute('SLNO', $row['SLNO']);
$xml->writeRaw($row['FIO']);
$xml->writeRaw($row['SEX']);
$xml->writeRaw($row['TITLE']);
$xml->writeRaw($row['LATFIO']);
$xml->writeRaw($row['ACCOUNT']);
$xml->writeRaw($row['ACCOUNTTP']);
$xml->writeRaw($row['ACCTSTAT']);
$xml->writeRaw($row['ADDRESS']);
$xml->writeRaw($row['ZIPLIVE']);
$xml->writeRaw($row['CORADDRESS']);
$xml->writeRaw($row['ZIPCONT']);
$xml->writeRaw($row['RESADDRESS']);
$xml->writeRaw($row['ZIPREG']);
$xml->writeRaw($row['CNTRYREG']);
$xml->writeRaw($row['CNTRYCONT']);
$xml->writeRaw($row['CNTRYLIVE']);
$xml->writeRaw($row['CELLPHONE']);
$xml->writeRaw($row['PHONE']);
$xml->writeRaw($row['BIRTHDAY']);
$xml->writeRaw($row['BRPART']);
$xml->writeRaw($row['EMAIL']);
$xml->writeRaw($row['FATHER']);
$xml->writeRaw($row['MOTHER']);
$xml->endElement();
}
$xml->endElement();
header('Content-type: text/xml');
echo $xml->flush();
?>
It is showing problem during execution.The following problem is showing there: This page contains the following errors:
error on line 3 at column 1: Extra content at the end of the document Below is a rendering of the page up to the first error.