tree_data FEATURE add XPath variable bindings
diff --git a/src/xpath.h b/src/xpath.h
index de0a7d3..eb832eb 100644
--- a/src/xpath.h
+++ b/src/xpath.h
@@ -222,6 +222,15 @@
 } _PACKED;
 
 /**
+ * @brief XPath variable bindings.
+ */
+struct lyxp_var {
+    char *name;     /**< Variable name. In the XPath expression, the name is preceded by a '$' character. */
+    char *value;    /**< The value of a variable is an object, which can be of any of the type that are possible
+                         for the value of an expression. */
+};
+
+/**
  * @brief XPath set - (partial) result.
  */
 struct lyxp_set {
@@ -460,6 +469,17 @@
         enum lyxp_token want_tok1, enum lyxp_token want_tok2);
 
 /**
+ * @brief Find variable named @name in @p vars.
+ *
+ * @param[in] vars [Sized array](@ref sizedarrays) of XPath variables.
+ * @param[in] name Name of the variable being searched.
+ * @param[in] name_len Name length can be set to 0 if @p name is terminated by null byte.
+ * @param[out] var Variable that was found. The parameter is optional.
+ * @return LY_SUCCESS if the variable was found, otherwise LY_ENOTFOUND.
+ */
+LY_ERR lyxp_vars_find(struct lyxp_var *vars, const char *name, size_t name_len, struct lyxp_var **var);
+
+/**
  * @brief Frees a parsed XPath expression. @p expr should not be used afterwards.
  *
  * @param[in] ctx libyang context of the expression.