Guest User

Untitled

a guest
Jun 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. from xml.dom import minidom
  2.  
  3. src = "<x><e>2</e><e>7</e></x>"
  4.  
  5. doc = minidom.parseString(src)
  6.  
  7. for node in doc.getElementsByTagName('e'):
  8. print node.firstChild.data # 2 \n 7
Add Comment
Please, Sign In to add comment