-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
howto get data from lyd_node? #1890
Comments
Once you get the |
Hello, I'm a student who is studying yang & neconf. I'm trying to extract my list data from the data node with the command, I'm trying to get rid of node for for loop and get list data. but continuously failed.
I'm trying to get data with lyd_node_any and using raw op variable both. but both failed. there is no child after node. `void fillSwitchInfo(struct lyd_node *node, SwitchInfo *switchInfo) {
} ` this is my fillswitchinfo function, but not working. the data from command looks like this one. but there is no child after node.
what should I do for extract data from get-config raw data. |
Hello,
tried to get data from :
earlier i'am use third library for retive data from xml, but i know, libyang make this better from lyd_node.
tried to make
ret_find_path = lyd_path( op, LYD_PATH_STD, buf_find_path, 127 );
return:
lyd_find_path( op, "data", true, &need_data );
return:
LY_SUCCESS
lyd_child( need_data );
return:
NULL
lyd_find_path( op, "lldp", true, &need_data );
return:
LY_EVALID
lyd_find_path( op, "data/lldp", true, &need_data );
return:
LY_EVALID
lyd_find_xpath( op, "data", &need_data );
return:
lyd_find_xpath( op, "lldp", &need_data );
return:
lyd_find_xpath( op, "data/lldp", &need_data );
return:
also i'am was reading some issues where was talking about
lyd_node_any
,any_xml
andlyd_get_value()
, but they not give undestand this.Can you tell, howto may retrive data from any
lyd_node
usesxpath
to him?The text was updated successfully, but these errors were encountered: