Writing big XML files where beginning depends on end.
Fredrik Lundh
fredrik at pythonware.com
Thu Nov 24 09:17:21 EST 2005
Magnus Lycka wrote:
> We're using DOM to create XML files that describes fairly
> complex calculations. The XML is structured as a big tree,
> where elements in the beginning have values that depend on
> other values further down in the tree. Imagine something
> like below, but much bigger and much more complex:
>
> <node sum="15">
> <node sum="10">
> <leaf>7</leaf'>
> <node sum="3">
> <leaf>2</leaf'>
> <leaf>1</leaf>
> </node>
> </node>
> <node sum="5">
> <leaf>5</leaf>
> </node>
> </node>
what's the typical overall structure for this tree ? is it short and wide, or tall and
narrow ?
or in other words, if you would extract all /node/node elements (that is, node
elements just under the document root) from a large file, would you typically get
a long list with small nodes, or a short list with a few large nodes ?
</F>
More information about the Python-list
mailing list