How can I declare the following xpath value as a string variable in C#?
Value: //*[contains(concat( " ", @class, " " ), concat( " ", "lit-movie", " " ))]
您必须使用转义字符(使用反斜杠),因此"
应替换为\\"
:
string xpath = "//*[contains(concat( \\" \\", @class, \\" \\" ), concat( \\" \\", \\"lit-movie\\", \\" \\" ))]";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.