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

xml output

From: Florian Henge <florian(dot)henge82(at)web(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: xml output
Date: 2010-08-23 11:33:43
Message-ID: 49520099.2598462.1282563223209.JavaMail.fmail@mwmweb078 (view raw or flat)
Thread:
Lists: pgsql-novice
<body bgcolor="#FFFFFF" background="https://img.web.de/v/p.gif" class="bgRepeatYes" style="; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-family: verdana, geneva; font-size: 9pt; padding-left: 0px; background-repeat: repeat repeat;"><div style="min-height: 200px; background-image: url(https://img.web.de/v/p.gif); background-repeat: repeat; background-color: #ffffff; font-family: verdana, geneva; font-size: 9pt; padding-left: 0px;">hi there!<br /><br />i wanted to ask how to get an xml output from a table like this:<br /><br />&lt;words&gt;<br />&lt;first_name&gt;joe&lt;/first_name&gt;<br />&lt;first_name&gt;ian&lt;/first_name&gt;<br />&lt;first_name&gt;carl&lt;/first_name&gt;<br />&lt;first_name&gt;ben&lt;/first_name&gt;<br />&lt;/words&gt;<br /><br />what i have is the following:<br /><br />
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">SELECT xmlelement(name words,</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">xmlforest(nachname))</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">FROM person</div>
SELECT <br />xmlelement(name words,<br />xmlforest(nachname))<br />FROM person<br /><br />but that gives me this:<br /><br />&lt;words&gt;&lt;first_name&gt;joe&lt;/first_name&gt;&lt;/words&gt;<br />&lt;words&gt;&lt;first_name&gt;ian&lt;/first_name&gt;&lt;/words&gt;<br />&lt;words&gt;&lt;first_name&gt;carl&lt;/first_name&gt;&lt;/words&gt;<br />&lt;words&gt;&lt;first_name&gt;ben&lt;/first_name&gt;&lt;/words&gt;<br /><br /><br />thanks in advance!<br /><br />bye, flo<br /><br /><br />&nbsp;</div>&nbsp;&nbsp;<br><br><table cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#000000"><img src="https://img.web.de/p.gif" width="1" height="1" border="0" alt="" /></td></tr><tr><td style="font-family:verdana; font-size:12px; line-height:17px;">Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  &nbsp;&nbsp;&nbsp;<br>Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02</td></tr></table>
</body>


Attachment: unknown_filename
Description: text/html (2.5 KB)

Responses

pgsql-novice by date

Next:From: Krzysztof HoffmannDate: 2010-08-23 11:53:31
Subject: Re: create a box from point?
Previous:From: Frank BaxDate: 2010-08-23 11:24:42
Subject: create a box from point?

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