xml processing : too slow...
Alex Martelli
aleax at aleax.it
Wed Jul 24 11:56:28 EDT 2002
Shagshag13 wrote:
...
> yes, but i use minidom on a small amount of data at once because i do
> something like :
>
> f = file(filename)
> while 1:
> line = f.readline()
> if line.find('</') != -1
> xmlLine = parseString(line)
> # do some processing to flatten xml
> # write to output file
> else:
> # write to output file
>
> and yes i use it to do for well-formedness
So you need EACH separate line to be a well-formed XML document
in its own right, or else include no closing-tag? I'm confused.
This is so far from XML that you MAY be better off doing your
own homebrewed parsing, depending on what other extra constraints
you may count on wrt normal XML.
Alex
More information about the Python-list
mailing list