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 - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -