- From: Jule Kleine <listmail@web.de>
- Date: Thu, 18 Aug 2005 01:53:08 +0200
- To: www-ql@w3.org
Hi,
I would like to use xquery to rename an element:
<text>
<old>value</old>
</text>
should then be:
<text>
<new>value</new>
</text>
-----
My XQuery is:
for $text in doc("sample.xml")/text
let $value := $text/old
let $outputValue := <new>{$value}</new>
return
(
<text>
{$outputValue}
</text>
)
What I get is:
<text>
<new>
<old>value</old>
</new>
</text>
Is there any chance to get $value without it's start and endtag ?
As far as I know I cannot get the text of an element with xpath, right ? So is there a way to solve it in xquery ?
I was experimenting with different forms of {$value} and $value and was searching in all examples I could get but couldnt solve the problem, I hope you know some help....
Thank you
Jule
_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179
Received on Wednesday, 17 August 2005 23:53:14 UTC