I can match sometext
and othertext
in
<br>
sometext
<br>
othertext
using xpath selector '//br/following-sibling::text()'
but if there is only whitespace after the <br>
element
<br>
<br>
othertext
only the second match occurs. Is it possible to match whitespace as well?
I tried
//br/following-sibling::matches(., "\s+")
to attempt to match whitespace without success.
sdfs
sdfd
` without result. I noticed that if I tried `//br/following-sibling::text()[matches(., "\s+")] | //br/following-sibling::text()` this also fails to produce a match, even though `//br/following-sibling::text()` does find a match on `sdfd`, suggesting there is perhaps some syntax problem with my use of matches(). `//br/following-sibling::text()[(normalize-space(.) eq "") and (. ne "")]` likewise gave no match. – jela Nov 21 '12 at 18:40sdfs
sdfd
` – jela Nov 24 '12 at 18:38