Take a closer look at the XCC distribution: it is packed with
documentation and code examples. Here's one from the docs section
"Passing Variables With Queries", also available at
http://developer.marklogic.com/pubs/3.2/javadoc/index.html
Session session = contentSource.newSession("mydatabase");
Request request = session.newAdhocQuery(
"define variable $myvar as xs:string external\n" +
"data($myvar)");
// create Variable "myvar", bind to Request, ignore return value
request.setNewVariable("myvar", ValueType.XS_STRING,
"Some string value");
// "$myvar as xs:string" will be defined at query run time
ResultSequence rs = session.submitRequest(request);
You could use the same technique with a module invoke or spawn.
-- Mike
Parthiban.K wrote:
Hi,
How to pass parameter to in-built xQuery method from java using XCC API ?
Thanks in advance.
------------------------------------------------------------------------
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general