2

notes要素の複数の子ノードを持つ、ルート ノードとして1 つの要素の「単一の」結果を作成するにはどうすればよいnoteですか?

のクエリは次のeXideとおりです。

xquery version "3.0";
    
for $note in collection('/db/tmp')/note
return <notes>{$note}</notes>

出力は次のとおりです。

nicholas@mordor:~/flwor$ 
nicholas@mordor:~/flwor$ lynx http://localhost:8080/exist/rest/db/scripts/notes.xq --dump
<notes>
    <note>
bar
</note>
</notes>
<notes>
    <note>
foo
</note>
</notes>nicholas@mordor:~/flwor$ 
nicholas@mordor:~/flwor$ 

notesFirefox が詰まらない単一のルート要素を持つ単一のドキュメントを取得するにはどうすればよいですか?

foo.xmlコレクションにはとの2 つのファイルがありますbar.xml

4

1 に答える 1