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) -

xcode - Swift Playground - Files are not readable -

jboss7.x - JBoss AS 7.3 vs 7.4 and differences -