added handler function to parse xml into metric structs