code: def _get_xml_iter(xml_source):
      
      if not hasattr(xml_source, 'read'):
          try:
              xml_source = xml_source.encode("utf-8")
          except (AttributeError, UnicodeDecodeError):
              pass
          return BytesIO(xml_source)
      else:
          try:
              xml_source.seek(0)
          except:
              # could be a zipfile
              pass
          return xml_source
docs: Possible inputs: strings, bytes, members of zipfile, temporary file
      Always return a file like object