Search Postgresql Archives

Re: Prevent x005F from xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I came up with this.
select replace( xmlelement(name my_xslt_tag,(select xmlparse(content '<![CDATA[<foo>bar</foo><bar>foo</bar>]]>')))::text ,'_x005F','')::xml;

It works but it's not very fast.


2012/11/23 Peter Kroon <plakroon@xxxxxxxxx>
When I run this query:
SELECT
xmlelement(name my_xslt_tag,
(SELECT XMLPARSE (CONTENT '<![CDATA[<foo>bar</foo><bar>foo</bar>]]>'))
)

I get this result:
"<my_x005F_xslt_tag><![CDATA[<foo>bar</foo><bar>foo</bar>]]></my_x005F_xslt_tag>"

Running soemthing similar in mssql prevents the x005F
SELECT 'data' AS p,'data' AS k
FOR XML RAW('xmlst')

How do I prevent the x005F in the tagname without changing the tagname?

Best,
Peter Kroon


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux