Hi all , i need some validation
I have an xml like this :
Now , my aim is to select all the url elements where the newurl attribute contains the word "tom" despite the case. I am using the xpath like this :
I am not sure since sometimes it returns correct result and sometime it doesnt ...
Would appreciate any help.
I have an xml like this :
Code:
<root>
<url newurl="aTom Bomb" />
<url newurl ="tOm and Jerry" />
<url newurl ="TomBoy" />
<url newurl ="Random string" />
</root>
Code:
var String ="TOM"; var xpath = "//url[contains(translate(@newurl, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),'" + String.toLowerCase()+"')]";
Would appreciate any help.
Comment