Of course. Which API are you using?
(1) create a Processor
(2) create a DocumentBuilder and use it to build the source
document (as an XdmNode)
(3) create an XQueryCompiler, compile the query, load it,
supply the document created in step (2) using XQueryEvaluator.setContextItem(),
and run the query
(4) repeat step (3) ad nauseam. (Or run the same query
multiple times with different parameters).
Is there a way where I can load the XML file once and
can fire multiple XQuery thereafter. I am not able to figure out how that can
be done. Please help