[lxml-dev] [objectify] DataElement factory problem
Stefan Behnel
behnel_ml at gkec.informatik.tu-darmstadt.de
Fri Oct 13 14:45:35 CEST 2006
Hi again,
Holger Joukl wrote:
> I ran into a problem using the objectify DataElement factory function.
> When implementing an _init method in a derived ObjectifiedDataElement
> class, it is impossible to access the element.text in _init because
> this has not yet been set when _init gets called by _elementFactory.
etree's C-API now has a new makeElement() function that creates an _Element
straight through with everything it can carry: attributes, text, tail and a
prefix mapping, either for an existing _Document or by creating a new document
also. Objectify uses it to overcome the above problem.
Stefan
More information about the lxml-dev
mailing list