Problem with processing XML

Stefan Behnel stefan.behnel-n05pAM at web.de
Wed Jan 23 06:03:27 EST 2008


Hi,

Paul Boddie wrote:
> People will, of course, tell you that you shouldn't use a DOM for
> anything and that the "consensus" is to use ElementTree or lxml (see
> above), but I can't help feeling that this has a damaging effect on
> the XML situation for Python: some newcomers would actually benefit
> from the traditional APIs, may already be familiar with them from
> other contexts, and may consider Python lacking if the support for
> them is in apparent decay. It requires a degree of motivation to
> actually attempt to maintain software providing such APIs (which was
> my solution to the problem), but if someone isn't totally bound to
> Python then they might easily start looking at other languages and
> tools in order to get the job done.

I had a discussion with Java people lately and they were all for Ruby, Groovy
and similar languages, "because they have curly braces and are easy to learn
when you know Java".

My take on that is: Python is easy to learn, full-stop.

It's the same for DOM: when you know DOM from (usually) the Java world, having
a DOM-API in Python keeps you from having to learn too many new things. But
when you get your nose kicked into ElementTree, having to learn new things
will actually help you in understanding that what you knew before did not
support your way of thinking.

http://www.python.org/about/success/esr/

So, there is a learning curve, but it's much shorter than what you already
invested to learn 'the wrong thing'. It's what people on this list tend to
call their "unlearning curve".

Stefan



More information about the Python-list mailing list