Re: PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files
В списке pgsql-general по дате отправления:
| От | Peter Eisentraut |
|---|---|
| Тема | Re: PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files |
| Дата | |
| Msg-id | 200808121240.32797.peter_e@gmx.net обсуждение исходный текст |
| Ответ на | PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files ("Lawrence Oluyede" <l.oluyede@gmail.com>) |
| Список | pgsql-general |
Am Thursday, 7. February 2008 schrieb Lawrence Oluyede: > PostgreSQL 8.3 instead doesn't allow the insertion of XML with doctype > in its new native data type returning this error message: > > """ > ERROR: invalid XML content > DETAIL: Entity: line 2: parser error : StartTag: invalid element name > <!DOCTYPE foo> > ^ It turns out that this behavior is entirely correct. It depends on the XML option. If you set the XML option to DOCUMENT, you can parse documents including DOCTYPE declarations. If you set the XML option to CONTENT, then what you can parse is defined by the production XMLDecl? content which does not allow for a DOCTYPE. The default XML option is CONTENT, which explains the behavior. Now, the supercorrect way to parse XML values would be using the XMLPARSE() function, which requires you to specify the XML option inline. That way, everything works.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера