data tree NEW getting string value and data path
diff --git a/src/tree_data.h b/src/tree_data.h
index c0dc1f0..41f8d01 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -743,6 +743,44 @@
*/
const struct lyd_node_term *lyd_target(struct lyd_value_path *path, const struct lyd_node **trees);
+/**
+ * @brief Get string value of a term data \p node.
+ *
+ * @param[in] node Data tree node with the value.
+ * @param[out] dynamic Whether the string value was dynmically allocated.
+ * @return String value of @p node, if @p dynamic, needs to be freed.
+ */
+const char *lyd_value2str(const struct lyd_node_term *node, int *dynamic);
+
+/**
+ * @brief Get string value of an attribute \p attr.
+ *
+ * @param[in] attr Attribute with the value.
+ * @param[out] dynamic Whether the string value was dynmically allocated.
+ * @return String value of @p attr, if @p dynamic, needs to be freed.
+ */
+const char *lyd_attr2str(const struct lyd_attr *attr, int *dynamic);
+
+/**
+ * @brief Types of the different data paths.
+ */
+typedef enum {
+ LYD_PATH_LOG /**< Descriptive path format used in log messages */
+} LYD_PATH_TYPE;
+
+/**
+ * @brief Generate path of the given node in the requested format.
+ *
+ * @param[in] node Schema path of this node will be generated.
+ * @param[in] pathtype Format of the path to generate.
+ * @param[in,out] buffer Prepared buffer of the @p buflen length to store the generated path.
+ * If NULL, memory for the complete path is allocated.
+ * @param[in] buflen Size of the provided @p buffer.
+ * @return NULL in case of memory allocation error, path of the node otherwise.
+ * In case the @p buffer is NULL, the returned string is dynamically allocated and caller is responsible to free it.
+ */
+char *lyd_path(const struct lyd_node *node, LYD_PATH_TYPE pathtype, char *buffer, size_t buflen);
+
#ifdef __cplusplus
}
#endif