Skip to content

Instantly share code, notes, and snippets.

@nickzam
Created June 20, 2013 09:02
Show Gist options
  • Save nickzam/5821322 to your computer and use it in GitHub Desktop.
Save nickzam/5821322 to your computer and use it in GitHub Desktop.
Get used namespace for lxml.etree xpath
from lxml import etree
tree = etree.fromstring(xml)
for elem in tree.getiterator():
print elem.tag, elem.attrib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment