If you using it on a webpage, you could wrap your row data within tags. I
got this from someone on the phpbuilder.com forum and it works great:
echo "<?xml version='1.0' encoding='ISO-8859-1' ?>\n\n";
echo "<dataset>\n";
while(odbc_fetch_row($result))
{
echo "<row>\n";
for ($i = 1; $i <= odbc_num_fields($result); $i++) {
$fname=odbc_field_name($result,$i);
$data=odbc_result($result,$i);
echo "<$fname>$data</$fname>\n";
}
echo "</row>\n";
}
echo "</dataset>\n";
Patrick Hatcher
Macys.Com
Legacy Integration Developer
Kevin Waterson
<kevin@oceania.net> To: pgsql-novice@postgresql.org
Sent by: cc:
pgsql-novice-owner@post Subject: [NOVICE] xml
gresql.org
01/14/2003 03:22 AM
Can I do a SELECT in postgresql and have the output as xml?
Kind regards
Kevin
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
Kevin Waterson
Port Macquarie, Australia
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster