Set a variable to an attribute of an xpath returned element