Added the option to add the text()/@id/@class etc to the xpath string