from xml.dom.minidom import parseString, parse
dom = parse('response.xml')
xmlTag = dom.getElementsByTagName('link')[0].toxml()
How do I get the attribute 'href' of the xml for rel="alternate":
<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=gfyKPbic&feature=youtube_gdata'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/gf7zhyKPbic/responses'/>
dom = parseString(data) dom = parse('response.xml')is invalid python syntax.