data tree FEATURE add lyd_change_leaf() function
New API function to change leaf's value.
diff --git a/src/tree_data.h b/src/tree_data.h
index b4da0b0..b7dca59 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -218,6 +218,18 @@
const char *val_str);
/**
+ * @brief Change value of a leaf node.
+ *
+ * Despite the prototype allows to provide a leaflist node as \p leaf parameter, only leafs are accepted.
+ *
+ * @param[in] leaf A leaf node to change.
+ * @param[in] val_str String form of the new value to be set to the \p leaf. In case the type is #LY_TYPE_INST
+ * or #LY_TYPE_IDENT, JSON node-id format is expected (nodes are prefixed with module names, not XML namespaces).
+ * @return 0 on success, non-zero on error.
+ */
+int lyd_change_leaf(struct lyd_node_leaf_list *leaf, const char *val_str);
+
+/**
* @brief Create a new anyxml node in a data tree.
*
* @param[in] parent Parent node for the node being created. NULL in case of creating top level element.