Easy way to transform XPath with contains to equals check? -


is there easy way transform xpath query (as string), like:

my/x/path[contains(sub/path, 'text')] 

to xpath query uses equals instead of contains? such can use same query, 1 time contains , time equals? unfortunately there no "equals" function in xpath...

you might differentiate between 2 options via flag:

my/x/path[ ($wantcontains , contains(sub/path, 'text'))             or             (not($wantcontains) , sub/path = 'text')          ] 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -