Hi,

I am wondering if there is a way to convert a String into a Node within XQuery.

For example, consider the xquery

let $node :=
 copy $c :=
   <entry>
     <title>entry title</title>
     <content>entry content</content>
   </entry>
 modify (
   return replace value of node $entry/title with 'new entry title', 
   return replace value of node $entry/content with 'new entry content'
 )
 return $c

return replace node doc('doc1')/entry with $c 

The above xquery throws the error: [XPTY0019] Context node required for entry; xs:string found. How do I fix this ?

Thanks,
Sony