Advertisement
VecH

Untitled

May 15th, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import xml.etree.ElementTree as ET
  4. tree = ET.parse('balance.xml')
  5. root = tree.getroot()
  6.  
  7. print root.find('ACCOUNT').text
  8. print root.find('NAME').text
  9. print root.find('NUMBER').text
  10. print root.find('STATUS').text
  11. print root.find('BALANCE').text
  12. print root.find('DATE').text
  13.  
  14. for packs in root.iter('GET_PACKS_AND_DISCOUNTS_INFO'):
  15.   print packs.find('PACK_NAME').text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement