from xml.dom.minidom import parseString data = '' xml = parseString(data) print xml.firstChild