[lxml] Re: Streaming read/write

2024-01-18 Thread Charlie Clark
On 18 Jan 2024, at 15:48, Stefan Behnel wrote: Hi Stefan, You might want to look into the more general XMLPullParser, but yes, both that and iterparse() generate a full XML tree in the back. The idea is that you actively delete parts of it when you're done with them, but you gain easy tree

[lxml] Re: Streaming read/write

2024-01-18 Thread Stefan Behnel
Hi Charlie, Charlie Clark schrieb am 18.01.24 um 12:13: I was recently wondering about the best way to edit XML documents using both a streaming reader and writer. I'm sure this is possible using iterparse and xmlfile but I seem to remember that iterparse produces the full tree so that parent

[lxml] Streaming read/write

2024-01-18 Thread Charlie Clark
Hiya, I was recently wondering about the best way to edit XML documents using both a streaming reader and writer. I'm sure this is possible using iterparse and xmlfile but I seem to remember that iterparse produces the full tree so that parent elements and their children are returned. Has