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:SELECTxmlelement(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 x005FSELECT 'data' AS p,'data' AS kFOR XML RAW('xmlst')How do I prevent the x005F in the tagname without changing the tagname?Best,Peter Kroon