Giriş
Şu satırı dahil ederiz.
Şöyle yaparız.
Şu satırı dahil ederiz.
import javax.xml.xquery.XQConnection;
import javax.xml.xquery.XQException;
import javax.xml.xquery.XQPreparedExpression;
import javax.xml.xquery.XQSequence;
Açıklaması şöyleexecuteQuery metoduXPath is generally an easy way of extracting a portion of an XML doucment. I'd not recommend using it for processing all of an XML document.
Şöyle yaparız.
OXQDataSource ds = new OXQDataSource();
XQConnection con = ds.getConnection();
String query = "<hello-world>{1 + 1}</hello-world>";
XQPreparedExpression expr = con.prepareExpression(query);
XQSequence result = expr.executeQuery();
// prints "<hello-world>2</hello-world>"
System.out.println(result.getSequenceAsString(null));
result.close();
expr.close();
con.close();
Hiç yorum yok:
Yorum Gönder