from xml.dom import minidom xmldoc = minidom.parse('binary.xml') reflist = xmldoc.getElementsByTagName('ref') firstref = reflist[0] print firstref.toxml() plist = firstref.getElementsByTagName("p") plist print plist[0].toxml() print plist[1].toxml()
Name (required)
email (will not be published) (required)
Website