I´m wondering how to use wildcards in XQuery.
I have two lines of codes which gives me the return that I want from a xml file:
for $phrase in //phrases[@pPhrase="Phrase1.mp3"]
return concat(string($phrase/@pPhrase), ", ",$phrase/ancestor::entrance/string(@name))
The problem I have is that sometimes I don´t know the exact name of the mp3 file I´m looking for.
So, if this would be a SQL query I´d type:
where pPhrase LIKE '%.mp3'
.
for $phrase in //phrases[@pPhrase LIKE ='%.mp3']
The above line doesn´t work of course, so what is the correct syntax?