开发者

SQL and/or functions that retrieves data formatted as XML then transform it to XHTML in PostgreSQL, is it possible?

Is there a way to retrieve the results of an SQL query in XML? If so how? can you provide a short example and/or a link to a good site?

Is it also possible the RDBMS can handle th开发者_如何学Ce transformation to XHTML given the XSLT? Would I want to do this anyway? Can I not send a browser XML and the XSLT and it will do the transformation itself?

I am using PostgreSQL 8.4


Yes. Here: http://www.postgresql.org/docs/8.4/interactive/functions-xml.html, here: http://wiki.postgresql.org/wiki/XML_Support and here: http://www.stylusstudio.com/sqlxml_tutorial.html.

It can using this: xslt_process(). Older browsers will not handle transforming with XSLT and IE as always does something differently but on the other hand you can offload the processing to the client.


Here its explained very well:

http://blog.sqlauthority.com/2009/02/12/sql-server-simple-example-of-creating-xml-file-using-t-sql/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜