Hello, You cannot modify an in-memory document using xdmp:node-insert and friends. They only work for documents in the database.
To do what you want to do, use the library available here: https://github.com/marklogic/commons/tree/master/memupdate Hope this helps. cheers, Jakob. On Fri, Jun 21, 2013 at 10:25 AM, sini narayanan <[email protected]>wrote: > Hi All, > > How do I perform a node-child-insert to a node? The node value is below. > I need to do this without inserting this node into the database. > > let $node := <query xmlns="http://marklogic.com/appservices/search"> > <and-query> > <collection-constraint-query> > <constraint-name>type</constraint-name> > <uri>xml</uri> > </collection-constraint-query> > </and-query> > </query> > > let $constraint := <range-constraint-query> > <constraint-name>country</constraint-name> > <value>FRA</value> > </range-constraint-query> > return > xdmp:node-insert-child($node//collection-constraint-query, $constraint) > > Thanks, > Sini > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
