Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib.request
- import xml.etree.ElementTree as etree
- f= open('air.xml',encoding='utf-8')
- text=f.read()
- f.close()
- #print(text)
- root=etree.fromstring(text)
- for child in root:#header,body
- for grandchild in child:#resultCode,resultMsg,items
- for ggchild in grandchild:
- for gggchild in ggchild:
- print(gggchild.tag)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement