class Parser_to_xml():
def import_xml(xml_file):
with open(xml_file, 'r') as f:
base_xml = f.read()
BASE = BeautifulSoup(base_xml, 'xml')
return BASE
def parse_xml(self):
BASE = self.import_xml('base.xml')
servers = BASE.find_all('server')
print(servers)
Parser_to_xml.parse_xml()
TypeError: Parser_to_xml.parse_xml() missing 1 required positional argument: 'self'