Parse the html DOM to determine the XPATH of elements