def is_votable(source):
 try:
  with iterparser.get_xml_iterator(source) as iterator:
   for (start, tag, data, pos) in iterator:
    if (tag != u'xml'):
     return False
    break
   for (start, tag, data, pos) in iterator:
    if (tag != u'VOTABLE'):
     return False
    break
   return True
 except ValueError:
  return False

def is_votable ( source ) : try : with iterparser . get_xml_iterator ( source ) as iterator : for ( start , tag , data , pos ) in iterator : if ( tag != u'xml' ) : return False break for ( start , tag , data , pos ) in iterator : if ( tag != u'VOTABLE' ) : return False break return True except ValueError : return False
reads the header of a file to determine if it is a votable file .