xml

Поиск
Список
Период
Сортировка
Искать

xml

От:
Kevin Waterson <kevin@oceania.net>
Дата:
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

Re: xml

От:
"Patrick Hatcher" <PHatcher@macys.com>
Дата:

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 "\n\n";
          echo "\n";
          while(odbc_fetch_row($result))
          {
               echo "\n";
               for ($i = 1; $i <= odbc_num_fields($result); $i++) {
                    $fname=odbc_field_name($result,$i);
                    $data=odbc_result($result,$i);

                    echo "<$fname>$data\n";
               }
               echo "\n";
          }
               echo "\n";

Patrick Hatcher
Macys.Com
Legacy Integration Developer



                                                                                                                             
                    Kevin Waterson                                                                                           
                               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




FAQ