this could, similarly to above, go in a function `get_instances(xml_doc`) that returns a list of instances