Created
December 18, 2016 11:46
-
-
Save lisysolution/612eaa6461a8177f3844612719eaedd8 to your computer and use it in GitHub Desktop.
파이썬에서 XML 읽기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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