XPath translate to lower case not working

Xorxness

New Member
the xml file looks like\[code\]<employees> <employee id='1'> <Profile_Name>admin</Profile_Name> <UserName>user</UserName> </employee> <employee id='2'> <Profile_Name>Admin</Profile_Name> <UserName>USER</UserName> </employee> <employee id='3'> <Profile_Name>Adminnn</Profile_Name> <UserName>userrrr</UserName> </employee>\[/code\]here is my xpath \[code\] employees/employee [not(Deleted)] [Profile_Name[last()] [translate(., 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' ) ] = 'admin'or UserName[last()] [translate(., 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' ) ] = 'user' ]\[/code\]it should select \[code\]employee\[/code\] elements that don't have \[code\]Deleted\[/code\] child and \[code\]Profile_Name\[/code\] = admin or \[code\]UserName\[/code\] = userregardless of the case of profileName and UserNameit works fine but don't take character case into consideration.it should return \[code\]employee\[/code\] with \[code\]id\[/code\] = 1 and 2
 
Back
Top