import lxml.etree as et
text = """<?xml version="1.0" encoding="windows-1251" standalone="yes" ?>
<!--Comment 1a-->
<!--Comment 1b-->
<a> waffle
   <!--Comment 2-->
   blah blah
</a>
<!--Comment 3a-->
<!--Comment 3b-->
"""
Разбор XML с помощью lxml и Python