dynamic naming for hierarchical problem

Erik Max Francis max at alcyone.com
Sat Aug 11 14:25:44 EDT 2001


Peter Hansen wrote:

> Of course, there's nothing that says every atomic
> piece of data has to be put into a separate element
> in XML.  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>

This wouldn't be a reasonable solution if, say, each of those
subelements (a through e) are optional, which it appears might be the
case (since in the last two lines it is d that is missing, not e).

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ If you don't take chances, you can't do anything in life.
\__/ Michael Spinks
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!



More information about the Python-list mailing list