0
我试图用一些文本以及其中的一个子节点替换一个节点。以下是我的XQuery。我没有得到理想的结果。用于插入父节点和子节点的XQuery
for $x in collection('articles')//Doc[Title/@No='Article 20']
return replace value of node $x/Desc with "Article on Molecular Physics
<Date @d='20130805'/> in continuation with Part 1."
Expecting-
....
<Desc>Article on Molecular Physics
<Date @d='20130805'/> in continuation with Part 1.</Desc>
....
但我getting-
....
<Desc>Article on Molecular Physics
<Date @d='20130805'/> in continuation with Part 1.</Desc>
....
感谢您的答案。但没有得到理想的结果。 ''在分子物理上的文章“'只有这部分被插入:( – John
啊好吧 - 看起来你不能在'替换值'的参数中提供结构化的XML(并且让它做你想做的事);这就是看起来你在自己的答案中有最好的解决方案。 –