Skip to content

Instantly share code, notes, and snippets.

@lisysolution
Created December 18, 2016 11:46
Show Gist options
  • Save lisysolution/612eaa6461a8177f3844612719eaedd8 to your computer and use it in GitHub Desktop.
Save lisysolution/612eaa6461a8177f3844612719eaedd8 to your computer and use it in GitHub Desktop.
파이썬에서 XML 읽기
import urllib.request as urllib
import xml.etree.ElementTree as xmlet
content = urllib.urlopen("http://xml-api-url/").read()
tree = xmlet.fromstring(content)
code = tree.find("Code")
result = tree.find("Result")
print(code.text)
print(result.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment