changed parse_xml to take elements as a variable or find elements with getelements