Thanks for the tips. I guess I am on the right way but i still cant get work. I parsed my string with a XMLInputFactory to a XQItem.
XQDataSource ds = new SaxonXQDataSource();
XQConnection conn = ds.getConnection();
StringReader xs = new StringReader(rt);
XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(xs);
XQItem doc = conn.createItemFromDocument(reader, null);
XQExpression expression = conn.createExpression();
I used the same xml structure and expression from the previous post. Then I execute the expression:
XQSequence results = expression.executeQuery(queryString);
.println(results.getSequenceAsString(new Properties()));
//results.writeSequence(System.out, null);
I try to print my result but I get an Error:
Error on line 2
FODC0002: C:\Stage\Projects\DA\MDF\Empire BurlesqueBobDylanUSAColumbia10.901985Hide your heartBonnie TylerUKCBS Records9.901988 (The systemcannot find the file specified)javax.xml.xquery.XQException: C:\Stage\Projects\DA\MDF\Empire BurlesqueBob DylanUSAColumbia10.901985Hide your heartBonnie TylerUKCBS Records9.901988 (The system cannot find the file specified)at net.sf.saxon.xqj.SaxonXQPreparedExpression.executeQuery(
It doens't make sense to me. Can someone help me to get it work? When I debug my code it will stop on the executeQuery method.