[xquery-talk] string manipulation
fatma helmy
fatmahelmy2000 at yahoo.com
Sun Feb 5 13:29:00 PST 2006
dear all
i use xquery evaluation version, i applied what i
received from you regarding string manipulation, here
is the result
I tried the following and got these results:-
let $p:=string-join(tokenize("book/title/author",
"/")[1 to last() - 1], "/")
return $p
it gives book/title/author , it did not eliminate
author , I need to get book/title
let $p:=
string-join(subsequence(tokenize("book/title/author",
"/"), 1, last() -
1), "/")
return $p
it gives me nothing
let $str := "book/title/author/kk" return
substring-before($str, concat("/",
substring-after($str, /")))
it gives me book only
I imagine that using parent , child primitives can I
get what I need? For example book/title is the parent
of book/title/author. How to mix these primitives to
get what I need?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the talk
mailing list