tabek
tabek

Reputation: 11

Postgresql xmlelement query

I've a query:

SELECT xmlelement(name Place, Tokyo)

and output looks like this:

<place>Tokyo</place>

how to change query to have output like this:

<n1:place>Tokyo</n1:place>

Thanks in advance for help.

Upvotes: 1

Views: 310

Answers (1)

Peter Eisentraut
Peter Eisentraut

Reputation: 36729

XML namespaces are not (yet) supported in XMLELEMENT.

You will have to do this by some sort of postprocessing, perhaps using XSLT.

Upvotes: 1

Related Questions