Re: xml
От | Patrick Hatcher |
---|---|
Тема | Re: xml |
Дата | |
Msg-id | OF44D15CFC.292D2758-ON88256CAE.00608386@fds.com обсуждение исходный текст |
Ответ на | xml (Kevin Waterson <kevin@oceania.net>) |
Список | pgsql-novice |
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
В списке pgsql-novice по дате отправления: