XMLDocument (SQL/XML X030)

Поиск
Список
Период
Сортировка
От Jim Jones
Тема XMLDocument (SQL/XML X030)
Дата
Msg-id d22cfe49-1567-4848-b7b7-9e1fe75f8828@uni-muenster.de
обсуждение исходный текст
Список pgsql-hackers
Hi,

I'd like to propose the implementation of XMLDocument (SQL/XML X030).It 
basically returns an XML document from a given XML expression, e.g.

SELECT
   xmldocument(
     xmlelement(NAME foo,
       xmlattributes(42 AS att),
       xmlelement(NAME bar,
         xmlconcat('va', 'lue'))
     )
   );

              xmldocument
--------------------------------------
  <foo att="42"><bar>value</bar></foo>
(1 row)

XMLDocument doesn't do much. In fact, it might be reduced to a simple 
xmlparse() call as XMLOPTION_DOCUMENT...

xmlparse(data, XMLOPTION_DOCUMENT, true)

... to make sure that the given XML expression is a valid document - 
still need some more research there. One could argue that XMLDocument() 
is in most cases unnecessary, but I believe it would facilitate the 
migration of scripts from other database products.

Any thoughts?

Best, Jim




В списке pgsql-hackers по дате отправления: