Ampersands in the output...

Поиск
Список
Период
Сортировка
От Schuhmacher, Bret
Тема Ampersands in the output...
Дата
Msg-id 98E4F4D46DACD0479C96D7356D5C37356B031C@sac1exch3.aspect.com
обсуждение исходный текст
Ответы Re: Ampersands in the output...
Список pgsql-jdbc
I'm using postgres to return business names via a function.  In the
function I "xml-ify" the output by taking the name and wrap it with
start/end tags, as in "<name>name</name>" (there's a lot more to this
and I'm simplifying greatly).  However, the problem is that some of the
names have "&" in them, like "Joes Bar & Grill", which really should be
escaped in XML.

Any ideas how to escape those things before they get to the recipient
(i.e. my application, IE, Mozilla, etc.)?  Is there a built-in function
or something I could make use of?  I suppose I could write a little more
code in my function to look in the field and try to do a string replace
or something, but is that the most efficient method?

Thanks in advance! :-)

Bret

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Encoding Problem
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Ampersands in the output...