Updated parse_xml to support multiple types