[Python-Dev] Fixing the XML batteries
janssen at parc.com
Fri Dec 9 19:15:54 CET 2011
Mike Meyer <mwm at mired.org> wrote:
> On Fri, 09 Dec 2011 09:02:35 +0100
> Stefan Behnel <stefan_ml at behnel.de> wrote:
> > a) The stdlib documentation should help users to choose the right
> > tool right from the start.
> > b) cElementTree should finally loose it's "special" status as a
> > separate library and disappear as an accelerator module behind
> > ElementTree.
> +1 and +1.
> I've done a lot of xml work in Python, and unless you've got a
> particular reason for wanting to use the dom, ElementTree is the only
> sane way to go.
I use ElementTree for parsing valid XML, but minidom for producing it.
I think another thing that might go into "refreshing the batteries" is a
feature comparison of BeautifulSoup and HTML5lib against the stdlib
competition, to see what needs to be added/revised. Having to switch to
an outside package for parsing possibly invalid HTML is a pain.
More information about the Python-Dev