Re: Postgresql XML parsing

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Postgresql XML parsing
Дата
Msg-id 5321D70C.2030703@dunslane.net
обсуждение исходный текст
Ответ на Re: Postgresql XML parsing  (Ashoke <s.ashoke@gmail.com>)
Список pgsql-hackers
On 03/13/2014 11:27 AM, Ashoke wrote:
> Hi,
>
>   Thanks for the input. I would look into JSON parsing as well, but 
> the requirement is XML parsing.
>
>   There is no DTD/Schema for the XML. Is there any way I could know 
> what are the possible tags and their values? I am building my parser 
> based on the output PostgreSQL produces (hard coding the tags) and I 
> am afraid I would miss out on tags.
>

No, it's not possible, since modules can hook in and add their own nodes 
with arbitrary names (see for example the Postgres FDW which does this). 
You need to be able to handle arbitrary tags, even if it's by ignoring them.

cheers

andrew




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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Is this a bug
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Store Extension Options