One of the overloads of XQDynamicContext.bindDocument() accepts a Reader; call it with
 
bindDocument(xx, new StringReader(inputString), null, null)
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay



From: Sweta Kedia [mailto:swetakedia@gmail.com]
Sent: 21 February 2010 10:22
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Querying a XMLFile stored in memory as String Object

Hi,

I am  using XQJ implementation  for processing XML  files in java. I have some xml files (not URI of files but the whole files itself)  which are converted into string objects . I want to query these string objects. How can I do this?

Thanks
Sweta