Re: patches for items from TODO list

Поиск
Список
Период
Сортировка
От Markus Bertheau
Тема Re: patches for items from TODO list
Дата
Msg-id 1116377979.7656.5.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: patches for items from TODO list  ("Sergey Ten" <sergey@sourcelabs.com>)
Ответы Re: patches for items from TODO list  ("Sergey Ten" <sergey@sourcelabs.com>)
Список pgsql-hackers
Dnia 13-05-2005, pią o godzinie 16:01 -0700, Sergey Ten napisał(a):

> <?xml version='1.0'?>
> <table>
>     <row>
>         <col name='col1' null='n'>Jackson, Sam</col>
>         <col name='col2' null='n'>\h</col>
>     </row>
>     <row>
>         <col name='col1' null='n'>It is "perfect".</col>
>         <col name='col2' null='n'>	</col>
>     </row>
>     <row>
>         <col name='col1' null='n'></col>
>         <col name='col2' null='y'></col>
>     </row>
> </table>

Why didn't you do something to the effect of

<?xml version='1.0'?>
<table><cols>    <col name='col1'/>    <col name='col2'/></cols><row>    <col null='n'>Jackson, Sam</col>    <col
null='n'>\h</col></row><row>   <col null='n'>It is "perfect".</col>    <col null='n'>	</col></row><row>
<col null='n'></col>    <col null='y'></col></row> 
</table>

This avoids repeating the column names in every row, which don't change
over the rows anyway. By reducing redundant information it also makes
structurally invalid XML less likely (whether that is relevant depends
on what people do with the XML data).

Also you could encode the XML output as UTF-8, which would make the
files more readable for humans if the text data is not ASCII.

Markus

--
Markus Bertheau <twanger@bluetwanger.de>

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Learning curves and such (was Re: pgFoundry)
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Learning curves and such (was Re: pgFoundry)