I think it would be clearer/cleaner to put this into a `get_forms(xml_doc)` function that returns a list of forms.