本文整理了Java中javax.xml.xquery.XQPreparedExpression.getAllExternalVariables()
方法的一些代码示例,展示了XQPreparedExpression.getAllExternalVariables()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XQPreparedExpression.getAllExternalVariables()
方法的具体详情如下:
包路径:javax.xml.xquery.XQPreparedExpression
类名称:XQPreparedExpression
方法名:getAllExternalVariables
[英]Retrieves all the external variables defined in the prolog of the prepared expression.
[中]检索在准备好的表达式的序言中定义的所有外部变量。
代码示例来源:origin: spring-projects/spring-integration-extensions
XQConnection conn = getConnection();
XQPreparedExpression expression = conn.prepareExpression(xQuery);
QName[] extParameters = expression.getAllExternalVariables();
if(extParameters != null && extParameters.length > 0) {
xQueryParameters = new ArrayList<String>();
代码示例来源:origin: dsukhoroslov/bagri
@ManagedOperation(description="Parse XQuery. Return array of parameter names, if any")
@ManagedOperationParameters({
@ManagedOperationParameter(name = "query", description = "A query request provided in XQuery syntax"),
@ManagedOperationParameter(name = "props", description = "Query processing properties")})
public String[] parseQuery(String query, Properties props) {
XQPreparedExpression xqpExp = null;
try {
XQStaticContext ctx = xqConn.getStaticContext();
props2Context(schemaManager.getEntity().getProperties(), ctx);
props2Context(props, ctx);
xqpExp = xqConn.prepareExpression(query, ctx);
QName[] vars = xqpExp.getAllExternalVariables();
String[] result = null;
if (vars != null) {
result = new String[vars.length];
for (int i=0; i < vars.length; i++) {
result[i] = vars[i].toString();
}
}
xqpExp.close();
return result;
} catch (XQException ex) {
logger.error("parseQuery.error", ex);
throw new RuntimeException(ex.getMessage());
}
}
内容来源于网络,如有侵权,请联系作者删除!