Problem with xpath function and full xml documents

Поиск
Список
Период
Сортировка
От Cheetah
Тема Problem with xpath function and full xml documents
Дата
Msg-id a9d6776b0807161330y74491836kee6f919edc4438c5@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
I'm trying to use the xpath function to search through an xml field
stored in my database (pgsql 8.3.3 win32).  It is failing miserably,
because the xpath function appears to wrap my xml content in an
<x></x> element.  It then tels me it can't parse the xml data because
my xml fields have the <?xml ...> at the start:

2008-07-16 16:11:18 ERROR  : ERROR:  could not parse XML data
DETAIL:  Entity: line 1: parser error : XML declaration allowed only
at the start of the document
<x><?xml version="1.0" encoding="utf-8"?>
           ^

I really don't want to go through and remove the <?xml> declarations
from the field contents, esp. since they are generated by code that
I'm not sure even supports suppressing that.

Is there any other way to make this work?  It seems rather odd to me
that the xpath function would be wrapping a full document in an extra
element.  I can see why it has to do that for fragments, but for a
document it doesn't seem right.

I'm not subscribed, so please CC me on replies!

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

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: 10.5 OS X ppc64 problem
Следующее
От: "Harvey, Allan AC"
Дата:
Сообщение: Re: 8.3.3 regression test on SCO 5.0.7