dynamic naming for hierarchical problem

Roman Suzi rnd at onego.ru
Sat Aug 11 16:00:26 EDT 2001


On Sat, 11 Aug 2001, Peter Hansen wrote:

>Roman Suzi wrote:
>>
>> Then it will be one quantum leap and:
>>
>> <myproblem:recordset>
>> <a>0</a><b>0</b><c>0<c><d>0</d><e>0</e>
>> <a>0</a><b>0</b><c>0<c><d>0</d><e>0</e>
>> <a>0</a><b>0</b><c>0<c><d>0</d><e>0</e>
>> <a>0</a><b>0</b><c>0<c><e>0</e>
>> <a>0</a><b>0</b><c>0<c><e>0</e>
>> </myproblem:recordset>
>>
>> or something similar.
>
>Of course, there's nothing that says every atomic
>piece of data has to be put into a separate element
>in XML.

Well, I really meant that some hairy file-format
is evolutionally transformed into XML...
(I was to lazy to make the file-format less trivial ;-)

>Since the above is to be manipulated by
>code, the following would be in many cases just as
>capable a format, and probably easier to manage:
>
><myproblem:recordset>
>  <record>0 0 0 0 0</record>
>  <record>0 0 0 0 0</record>
>  <record>0 0 0 0 0</record>
>  <record>0 0 0 0</record>
>  <record>0 0 0 0</record>
></myproblem:recordset>

Even here, better way is:

<record a="0" b="0" c="0" d="0" />

(Well, atomicity depends on how deep one need to process
data. For some purposes even:

<myproblem:recordset>
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0
0 0 0 0
</myproblem:recordset>

will be fine.


Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Saturday, August 11, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "After a hard day, it's nice to come home to a warm cat." _/





More information about the Python-list mailing list