更新时间:2023-12-04 15:03:40
我不知道将单个换行符放入XPath的好方法,但是如果主要目的是选择normalize-space()
,则可以使用normalize-space()
元素及其包含换行符的事实并不那么重要:
I don't know of a good way to place a single newline character into an XPath, but you could use normalize-space()
if your main objective is to select the element and the fact that it contains a newline isn't all that important:
//*[normalize-space(@text) = 'Test string with new line']