rquery
rquery copied to clipboard
Adding child contents to parent text while streaming the document
hi @ancamcheachta, thanks again for your contribution! This does indeed solve the immediate problem, but as you have highlighted in the issue, this design is pretty memory intensive. I will take a bit more time to consider this PR, code-wise it looks great but I would like to explore other alternatives over the next few days.
Thanks @yggie, sounds promising. As a rough and ready solution this change works for me, but yes I'd rather the alternative myself.
I suspect you might keep some variation on this line in new_from_xml_stream
, except maybe you don't push the actual value into the text
field, but rather some kind of placeholder.
Perhaps then in the text()
function you could chain something to children_iter()
that formats the text
field with the children's own text()
values. With any luck that should recursively add the text
values of every descendent element.
However you do it, hopefully this test case is adequate to cover.
Hi guys, I'm considering using rquery as part of my website, has any more thought been put into this?
@measlytwerp sorry I haven’t had a look at the issue in a while, this project sort of dropped off my radar as life got busier. Will try to put aside some time this week to look at the issue, is this issue a huge concern for your website?