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/
精彩评论