Rustom Mody wrote: > On Sunday, January 21, 2018 at 4:51:34 PM UTC+5:30, Peter Otten wrote: >> Personally I'd probably avoid the extra layer and write a function that >> directly maps dataclasses or database records to xml using the >> conventional elementtree API. > > Would appreciate your thoughts/comments Peter! > > I find that you can get 'E' from lxml.objectify as well as lxml.builder > builder seems better in that its at least sparsely documented > objectify seems to have almost nothing beyond the original David Mertz' > docs > > builder.E seems to do what objectify.E does modulo namespaces > > builder.E and objectify.E produce types that are different and look > backwards (at least to me — Elementbase is less base than _Element) > > You seem to have some reservation against objectify, preferring the > default Element — I'd like to know what
While I don't have any actual experience with it, my gut feeling is that it simplifies something that is superfluous to begin with. > Insofar as builder seems to produce the same type as Element unlike > objectify which seems to be producing a grandchild type, do you have the > same reservations against builder.E? If I understand you correctly you are talking about implementation details. Unfortunately I cannot comment on these -- I really just remembered objectify because of the catchy name... -- https://mail.python.org/mailman/listinfo/python-list