Re: xml to string, ascii x utf8 conversion
От | Peter Eisentraut |
---|---|
Тема | Re: xml to string, ascii x utf8 conversion |
Дата | |
Msg-id | 200907211227.56775.peter_e@gmx.net обсуждение исходный текст |
Ответ на | xml to string, ascii x utf8 conversion (Radek Novotný <radek.novotny@mediawork.cz>) |
Список | pgsql-general |
On Monday 20 July 2009 19:46:01 Radek Novotný wrote: > query_to_xml('select Nazev as "TITLE", Datum as "DATE", Autor_Akce as "meta > rel=''action_author''", .... > > gave me > > <table xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <row> > <TITLE>Test</TITLE> > <DATE>2009-07-20</DATE> > <meta_x0020_rel_x003D__x0027_action_author_x0027_>test > </meta_x0020_rel_x003D__x0027_action_author_x0027_> > > How can i transcode this well generated xml(ascii) to string(UTF8) without > the escape characters? This has nothing to do with ASCII vs. UTF-8. The problem is that "meta rel='action_author'" is not a valid XML *element* name, so it needs to be escaped. What you are trying to achieve is presumably to get a meta element with a rel attribute. To get that, you will have to run the result of query_to_xml through some postprocessing (with XSLT, for example).
В списке pgsql-general по дате отправления: