I'm using Netopeer2 library for Netconf client and server. Command line program source codes of client and server are available.
In client side, upon executing get-config for specific yang model, the response is printed in the command line.
However I want to fetch the value of the Leaf node from that response and use it for my application.
The response is received in lyd_node*.
I got the hint online to use lyd_find_path() of libyang to do this. I called it like this:
LY_ERR ret = lyd_find_path(op, "/etsi-qkd-sdn-node:qkd_node/qkdn_version", 1, &match);
Upon debugging lyd_find_path(), I found that it is failing at the line
ret = ly_path_eval_partial(lypath, ctx_node, NULL, 0, NULL, match).
The error value is: LY_ENOTFOUND