nareshkamboju

code

Feb 13th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. #!/usr/bin/python
  2. #
  3.  
  4. import sys
  5. import xml.etree.ElementTree as ET
  6.  
  7. input_file = sys.argv[1]
  8. tree = ET.parse(input_file)
  9. root = tree.getroot()
  10.  
  11. for geninfo in root.findall('General_Info'):
  12.     for archive in geninfo.findall('Archiving_Info'):
  13.          ARCHIVING_TIME = archive.find('ARCHIVING_TIME').text
  14.          print ARCHIVING_TIME
Add Comment
Please, Sign In to add comment