<xml></xml>

Saxon API for .NET |

# XQueryEvaluator.SetExternalVariable Method

Set the value of an external variable declared in the query.

public void SetExternalVariable(
QName name,
XdmValue value
);

#### Parameters

name
  The name of the external variable, expressed as a QName. If an external variable of this name has been declared in the query prolog, the given value will be assigned to the variable. If the variable has not been declared, calling this method has no effect (it is not an error).
value
  The value to be given to the external variable. If the variable declaration defines a required type for the variable, then this value must match the required type: no conversions are applied.

#### See Also

XQueryEvaluator Class | Saxon.Api Namespace