XPath expression text () - what to specify in text () if it contains a new line
4 answers
Use .//*[@id='someid']//h6[. = 'text1 text2']
. This assumes that you write the path inside XSLT or XForms where you can use
to avoid the appearance of a newline character. If you are not using XSLT, you can tell us which host language (e.g. PHP, C #, Java) you are using XPath in.
+1
source to share