[xquery-talk] (no subject)

Martin Probst martin at x-hive.com
Mon Jan 23 11:38:50 PST 2006


> i ask for a url in a xml file and i get the result :
> http://www.some.com/myPic.jpg
> what should i do if i want to take only the file name? 
> myPic.jpg

Well, you'll need to chop of the last part of that string, e.g. using
the fn:replace() function:

replace("myPic.jpg", "^.*/", "")

(replace everything up to the slash with the empty string, leaving
everything that's after the slash). XQuery has a big set of string
manipulation functions, so there are different ways of achieving this.


More information about the talk mailing list