dynamic allocation file buffer
Steven D'Aprano
steven at REMOVE.THIS.cybersource.com.au
Fri Sep 12 02:30:42 EDT 2008
On Thu, 11 Sep 2008 22:40:01 -0700, Dennis Lee Bieber wrote:
> On 12 Sep 2008 03:37:51 GMT, Steven D'Aprano
> <steven at REMOVE.THIS.cybersource.com.au> declaimed the following in
> comp.lang.python:
>
>
>> I'm pretty sure you're wrong. XML can be used for serialization, but
>> that doesn't mean it is only sequential data. XML is suitable for
>> hierarchical data too. To quote Wikipedia:
>>
> There is a difference between the format of the data content, and
> the processing of that data... Regardless of the content, one
> essentially has to process the XML /file/ sequentially, and translate
> into an in-memory model that allows for accessing said data. To reach
> the nth subelement of the mth element requires reading all 1..m-1
> elements, followed by all 1..n-1 subelements in m. Modifying any element
> requires rewriting the entire file.
Which is why I previously said that XML was not well suited for random
access.
I think we're starting to be sucked into a vortex of obtuse and opaque
communication. We agree that XML can store hierarchical data, and that it
has to be read and written sequentially, and that whatever the merits of
castironpi's software, his original use-case of random access to a 4GB
XML file isn't workable. Yes?
--
Steven
More information about the Python-list
mailing list