
Hi Nat,
I'm mostly using lxml.objectify (to parse some XML in an HTTP response) but in some cases I need to use lxml.etree (also to parse an HTTP response) because in those cases the XML I'm dealing with is less predictable/regular.
Can you elaborate a bit on what makes lxml.objectify less suitable for these cases?
However, once I've done some initial processing on the non-Objectified version, I'd like to make an Objectified version of it. I could convert through a string and back, but I'm looking for something (that I assume would be) faster.
Interesting question. I don't know any obvious conversion method but I'd say just go for serialization & re-parsing. It's an area where lxml usually shines speed-wise. Unless your performance/memory measurements tell you this is not the way to go for your use case, of course... Holger Landesbank Baden-Wuerttemberg Anstalt des oeffentlichen Rechts Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz HRA 12704 Amtsgericht Stuttgart