Python XML API's that preserve XML comments?

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


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

Try lxml.

http://codespeak.net/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).

Stefan



More information about the Python-list mailing list