Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Last active August 15, 2016 13:20
Show Gist options
  • Save kurozumi/f46289711c193945ebd26dd82605356f to your computer and use it in GitHub Desktop.
Save kurozumi/f46289711c193945ebd26dd82605356f to your computer and use it in GitHub Desktop.
【Python】名前空間付きのxmlファイルを解析(パース)する方法
from lxml import objectify
with open("sample.xml", "r") as f:
xml = f.read()
root = objectify.fromstring(xml)
print(root.title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment