xpath expression to remove whitespace

I. Use this single XPath expression:

translate(normalize-space(/tr/td/a), ' ', '')

Explanation:

  1. normalize-space() produces a new string from its argument, in which any leading or trailing white-space (space, tab, NL or CR characters) is deleted and any intermediary white-space is replaced by a single space character.

  2. translate() takes the result produced by normalize-space() and produces a new string in which each of the remaining intermediary spaces is replaced by the empty string.


II. Alternatively:

translate(/tr/td/a, ' 	
&#13', '')

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)