#NEWLINE# def soup_maker( fh ) : #NEWLINE# #INDENT# skip_headers ( fh ) #NEWLINE# try : #NEWLINE# #INDENT# from bs4 import BeautifulSoup #NEWLINE# soup = BeautifulSoup ( fh , 'xml' ) #NEWLINE# for tag in soup . findAll ( ) : #NEWLINE# #INDENT# tag . name = tag . name . lower ( ) #NEWLINE# #UNINDENT# #UNINDENT# except ImportError : #NEWLINE# #INDENT# from BeautifulSoup import BeautifulStoneSoup #NEWLINE# soup = BeautifulStoneSoup ( fh ) #NEWLINE# #UNINDENT# return soup