Python XML API's that preserve XML comments?

Stefan Behnel stefan.behnel-n05pAM at
Wed Sep 26 09:27:15 CEST 2007

Dan Stromberg wrote:
> Are there any python XML parsing API's that preserve comments -

Try lxml.

> preferrably that come with python 2.5.1?

It doesn't come with Python 2.5.1, but it's compatible to ElementTree, which
is part of the stdlib. So you can have a fallback to the stdlib if lxml is not
installed (though this will loose comments then).


More information about the Python-list mailing list