Re: returning PGresult as xml
От | Peter Eisentraut |
---|---|
Тема | Re: returning PGresult as xml |
Дата | |
Msg-id | 200401251823.33826.peter_e@gmx.net обсуждение исходный текст |
Ответ на | returning PGresult as xml (Brian Moore <brianmooreca@yahoo.com>) |
Ответы |
Re: returning PGresult as xml
Re: returning PGresult as xml |
Список | pgsql-hackers |
Brian Moore wrote: > i feel badly that i have not been able to use any existing > standards. xmlrpc, i found, was not type-rich enough, and that made > it difficult or impossible to use. in particular, the only way to > represent a matrix is as a struct of structs. this makes it very > verbose for one to encode a PGresult. i found SOAP too difficult for > compliance. so my result was to create a schema, which results in a > DTD. Let me point out an implementation I made last time this subject was discussed: http://developer.postgresql.org/~petere/xmltable.tar.bz2 This package contains server-side functions that convert a table (more generally a query result) to an XML document and/or and XSL schema both mimicking the SQL/XML standard. Additionally, it contains a function to convert such an XML document back to a table source. I also threw in an XSLT stylesheet to convert an SQL/XML table to an HTML table, so you can more easily view the results. I also have some code in development that adds cursor interfaces, an XML data type, and some integration with the existing XPath functionality. I think that for processing XML in the database and as far as following the existing standards, this is the direction to take. Also last time this subject was dicussed, I believe it was Mike Mascari who proposed and implemented another solution which is more client-side oriented. He wrote a piece of code that took a normal libpq result set and shipped it off as SQL/XML wrapped in SOAP. And it had streaming capabilities for large result sets. These are two complementary approaches that exist more or less. Of course this only covers the C API and would need sensible extensions for other programming langauges. But I invite you to look at them and see whether they fit your needs (the ideas, not necessarily the state of the code).
В списке pgsql-hackers по дате отправления: