Skip to content

Instantly share code, notes, and snippets.

@wzpan
Created August 2, 2013 13:49
Show Gist options
  • Select an option

  • Save wzpan/6140021 to your computer and use it in GitHub Desktop.

Select an option

Save wzpan/6140021 to your computer and use it in GitHub Desktop.
Python - xml parser
try:
from lxml import etree
except ImportError:
import xml.etree.ElementTree as etree
tree = lxml.etree.parse('file.xml')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment