Stefan Behnel wrote: >> My take on the API decision in question was always that a file is >> inherently an XML *document*, while a string is inherently an XML >> *fragment*. > > Not inherently, no. I know some people who do web processing with an XML > document coming in as a string (from an HTTP request) /.../
in which case you probably want to stream the raw XML through the parser *as it arrives*, to reduce latency (to do that, either parse from a file-like object, or feed data directly to a parser instance, via the consumer protocol). also, putting large documents in a *single* Python string can be quite inefficient. it's often more efficient to use lists of string fragments. </F> -- http://mail.python.org/mailman/listinfo/python-list