dynamic naming for hierarchical problem

Peter Hansen peter at engcorp.com
Sat Aug 11 20:29:39 CEST 2001


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.  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>

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list