Best way of dealing with empty attributes

Hi,
we often have the case where element attributes may turn out to be None. This leads to an error in lxml when creating an Element, or serialising it in ElementTree. Is it possible to configure the behaviour is such situations? Either to ignore the attribute or just create it with no value?
Charlie

Charlie Clark schrieb am 24.09.2014 um 11:45:
we often have the case where element attributes may turn out to be None. This leads to an error in lxml when creating an Element, or serialising it in ElementTree. Is it possible to configure the behaviour is such situations? Either to ignore the attribute or just create it with no value?
No, not currently. And not sure there should be. (And if so, how.)
How do you create them? **kwargs? attrib dict? And where do the values come from in the first place?
Stefan
participants (2)
-
Charlie Clark
-
Stefan Behnel