import re
from xml.etree import cElementTree as etree
lines = re.findall('^\\s*///(.*)', text, re.MULTILINE)
root = etree.fromstring('<root>%s</root>' % ''.join(lines))
print(root.findtext('summary'))
pyparsing — парсить xml-комментарий