LINE_DUMMY_ATTR = '_DUMMY_LINE'

def parseXml(filename):
    f = file.open(filename, 'r')
l = 0
content = list()
for line in f:
    l += 1
content.append(re.sub('<(\\w+)', '<\\1 ' + LINE_DUMMY_ATTR + '="' + str(l) +
    '"', line))
f.close()
return minidom.parseString(''.join(content))
python reporting line/column of origin of XML node