如何在C#中将以下xpath值声明为字符串变量?
值: //*[contains(concat( " ", @class, " " ), concat( " ", "lit-movie", " " ))]
答案 0 :(得分:0)
您必须使用转义符(使用反斜杠),因此"
应该替换为\"
:
string xpath = "//*[contains(concat( \" \", @class, \" \" ), concat( \" \", \"lit-movie\", \" \" ))]";