I am having trouble getting an XPath function to work. I am supposed to pull only the entries in the XML file that the name of them ends with the letter 'z' and I cannot get it to work. I am xmllint to manipulate the file with the cat command.
ends-with()
only works on XPath 2.0 and I'm pretty sure the server only has XPath 1.0 so I have tried entering this command:
cat //country/city[substring(@name, string-length(@name) - string-length('z') +1)]/name
but I keep getting an error, and I am not sure if I am writing it improperly or if it is not the correct way to do it.