ElementTree.XML(string XML) and ElementTree.fromstring(string XML) not working

Stefan Behnel stefan_ml at behnel.de
Fri Jun 26 02:20:15 EDT 2009


Carl Banks wrote:
> On Jun 25, 10:11 pm, Stefan Behnel wrote:
>> Carl Banks wrote:
>>>> Why isn't et.parse the only way to do this? Why have XML or fromstring  
>>>> at all?
>>> Because Fredrick Lundh wanted it that way.  Unlike most Python
>>> libraries ElementTree is under the control of one person, which means
>>> it was not designed or vetted by the community, which means it would
>>> tend to have some interface quirks.
>> Just for the record: Fredrik doesn't actually consider it a design "quirk".
> 
> Well of course he wouldn't--it's his library.

That's not an argument at all. Fredrik put out a alpha of ET 1.3 (long ago,
actually), which is (or was?) meant as a clean-up release for a number of
real quirks in the library (lxml also fixes most of them since 2.0). The
above definitely hasn't changed, simply because it's not considered 'wrong'
by the author(s).

Stefan



More information about the Python-list mailing list