Answer the question
In order to leave comments, you need to log in
How to return a string without spaces around the edges?
Hello!
How to return the first text node of its parent without whitespace around the edges?
Node:
XPath query:
...returns: "Hello " (with a space at the end).
Is it possible, with just one XPath , to return strings without spaces "Hello"?
Thank you! <p>Hello <b>World</b> by.</p>
p/text()[normalize-space(.)][1]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question