Ivan Pozdeev, 25.05.2014 05:57:
Ps to my earlier email. Is there a way in which I can make lxml "forget" everything about a file as soon as it is done with it. I have a dim sense that iterparse has something to do with that, but I don't know how to tell the program, " when you're done with file A, wipe out everything in memory before moving on to file B." Some command of that kind should do the trick, because the program has no trouble processing individually any of the files it complains about when they are encountered in the aggregate.
Create another parser object?
That shouldn't change anything. A parser doesn't keep state across runs. It's mainly just a wrapper around a specific configuration and a lock that prevents concurrent usage. Parser state is freshly created on each run. Stefan