Using Wildcard in FLWOR

25 views Asked by At

I´m trying to use wildcards in a where clause to recieve elements from an xml file. I´m using BaseX and the built in editor.

This line of code:

for $route in //route
where $route/string(@routeinfo) contains text '4681'
return string($route/@routeinfo)

returns all elements where routeinfo equals 4681. What if I´d like to return all elements where routeinfo ends with '81'?

routeinfo is an attribute, worth mentioning perhaps.

I´ve tried

contains text '*81' using wildcards

and similar syntaxes but nothing works, I don´t get any matches, any suggestions?

0

There are 0 answers