Use xpath method to shorten search code.