Skip site navigation (1) Skip section navigation (2)

Display XML Table output in Browser

From: "Carel Combrink" <s25291930(at)tuks(dot)co(dot)za>
To: "PostgreSQL Novice List" <pgsql-novice(at)postgresql(dot)org>, "PostgreSQL JnbPretoria List" <jnbpug(at)postgresql(dot)org>
Subject: Display XML Table output in Browser
Date: 2010-08-26 07:39:38
Message-ID: (view raw or whole thread)
Lists: jnbpugpgsql-novice

I am looking at displaying a table to a user using a web browser. I  
have been looking at the PostgreSQL XML functions and it seems to do  
what I need. One problem is that I can't get it displayed using the  
XSLT stylesheet provided  
( I have very little knowledge of XML especially  

Can someone please help me to display a simple table in HTML using  
these functions and stylesheets.

I have a simple table that looks as follow:
SELECT * FROM test_html;
  idx |           time_1           | some_text
    1 | 2010-08-26 09:34:06.067618 | One
    2 | 2010-08-26 09:34:06.067618 | Two
    3 | 2010-08-26 09:34:06.067618 | Three
(3 rows)

How should I then use the output of the following statement:
SELECT table_to_xml_and_xmlschema('test_html', TRUE, TRUE, '');

Thank you,
Carel Combrink

This message and attachments are subject to a disclaimer. Please refer
to for full
details. / Hierdie boodskap en aanhangsels is aan 'n vrywaringsklousule
onderhewig. Volledige besonderhede is by beskikbaar.

pgsql-novice by date

Next:From: Mladen GogalaDate: 2010-08-26 20:01:40
Subject: COPY command
Previous:From: Tom LaneDate: 2010-08-25 14:30:48
Subject: Re: calling functions which take user defined types

jnbpug by date

Next:From: Olalekan SamuelDate: 2011-01-18 10:52:35
Subject: I am getting this error. Can anyone helpplease
Previous:From: Alastair TurnerDate: 2010-06-08 07:40:57
Subject: In case you hadn't guessed ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group