implemented function for obtaining normalized words from xpath