from xml.dom.minidom import parseString dom = parseString('text') doc = dom.documentElement text = doc.firstChild print text.__dict__ print text.childNodes text.normalize()