Match entry with most specific xpath to each node.