[lxml-dev] Objectify and a text-tag

Stefan Behnel stefan_ml at behnel.de
Mon Feb 26 18:29:46 CET 2007


Hi,

Stefan Behnel wrote:
> Christian Zagrodnick wrote:
>> assuming i've got an XML like
>>
>> <foo><text>blabla</text></foo>
>>
>> How am I supposed to change the blabla text? foo.text does obviously 
>> not work since that is the text value of foo.
>>
>> foo['text'] would have been nice, but that's not working either.
> 
> Ah, right. That's a bug, I'd say. We special case things like 'text' in
> __setattr__(), but not in __setitem__(), where we delegate to __setattr__ for
> the easy stuff.
> 
> I'll see how to fix that.

Should be fixed on the trunk now.

Have fun,
Stefan



More information about the lxml-dev mailing list