Hi,<br><br>How to create an xml fragment whose root name is dynamic? The following code is false, of course.<br><br>let $a := &lt;a&gt;bbb&lt;/a&gt;<br>let $r := $a/text()<br>return<br>&lt;{$r}&gt;something&lt;/{$r}&gt;<br>
<br>With namespace?<br><br>return<br>&lt;{QName(&quot;<a href="http://aaa">http://aaa</a>&quot;,concat($prefix,&quot;:&quot;,$r))}/&gt;<br><br>Are there any methods to do this?<br><br>Thanks,<br>Lei<br><br>