On 21 Jan 2024, at 12:42, Stefan Behnel wrote:
Hi Stefan,
> If you want to avoid creating element objects all together, maybe even don't
> need a full (sub-)tree structure to get all relevant information, I suggest
> you try the low-level SAX interface.
>
> https://lxml.de/parsing.html#the-targ
Charlie Clark schrieb am 19.01.24 um 15:00:
On 18 Jan 2024, at 18:10, Charlie Clark wrote:
Apart from the fact that this currently doesn't work, I imagine that both
Elements and their children would happily be passed to the write, which could
lead to an almighty mess. Getting this to work pro
On 18 Jan 2024, at 18:10, Charlie Clark wrote:
> Apart from the fact that this currently doesn't work, I imagine that both
> Elements and their children would happily be passed to the write, which could
> lead to an almighty mess. Getting this to work properly, possibly rewritten
> for async to
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 na
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 el