public class XPathBuiltin extends Object
XPathEvaluator} instance.Constructor and Description |
---|
XPathBuiltin() |
Modifier and Type | Method and Description |
---|---|
static void |
assign(Context ctx,
Object location,
Object data,
Evaluator.AssignType type,
String attr)
Assigns data to a location
|
static Object |
eval(Context ctx,
String expression)
Evaluate an xpath expression returning a data value
|
static Object |
evalLocation(Context ctx,
String expression)
Evaluate an xpath location that returns a data assignable reference or list of references.
|
static boolean |
isXPathLocation(Context ctx,
Object data)
Determine if an
Evaluator.evalLocation(Context, String) returned result represents an XPath location |
static void |
setEvaluator(XPathEvaluator evaluator)
Optional static setter to change and override the default
XPathEvaluator |
public XPathBuiltin()
public static void setEvaluator(XPathEvaluator evaluator)
XPathEvaluator
evaluator
- A custom evaluator to be usedpublic static Object eval(Context ctx, String expression) throws SCXMLExpressionException
ctx
- variable contextexpression
- xpath expressionSCXMLExpressionException
- A malformed expression exceptionEvaluator.eval(Context, String)
public static Object evalLocation(Context ctx, String expression) throws SCXMLExpressionException
ctx
- variable contextexpression
- expressionSCXMLExpressionException
- A malformed expression exceptionEvaluator.evalLocation(Context, String)
public static boolean isXPathLocation(Context ctx, Object data)
Evaluator.evalLocation(Context, String)
returned result represents an XPath locationctx
- variable contextdata
- result data from Evaluator.evalLocation(Context, String)
XPathEvaluator.isXPathLocation(Context, Object)
public static void assign(Context ctx, Object location, Object data, Evaluator.AssignType type, String attr) throws SCXMLExpressionException
ctx
- variable contextlocation
- location expressiondata
- the data to assign.type
- the type of assignment to perform, null assumes Evaluator.AssignType.REPLACE_CHILDREN
attr
- the name of the attribute to add when using type Evaluator.AssignType.ADD_ATTRIBUTE
SCXMLExpressionException
- A malformed expression exceptionEvaluator.evalAssign(Context, String, Object, Evaluator.AssignType, String)
,
XPathEvaluator.assign(Context, Object, Object, Evaluator.AssignType, String)
Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.