You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some time ago we were discussing that in order to get all the nodes of a module, the xpath /test-module:*//. should be used rather than /test-module:*//*.
But after we replaced * with . in our test applications, we started to observe the following error: libyang: Unexpected character(s) '*' (*//.).
It turned out that while lyd_get_node() processes this xpath just fine, ly_ctx_get_node() returns this error. Is there a difference between these two functions related to the input xpath that we should be aware of?
Thanks,
Milan
The text was updated successfully, but these errors were encountered:
Hi Milan,
if you read the function documentation carefully, you will notice that ly_ctx_get_node() accepts "schema node identifier in JSON format", while ld_get_node() an "XPath expression". The difference is explained in more detail in the general documentation, which is available if you execute make doc. Look into the HTML documentation libyang/How To.../XPath Addressing. Very briefly, the reason for the difference is that ly_ctx_get_node() is evaluated on schema.
Some time ago we were discussing that in order to get all the nodes of a module, the xpath
/test-module:*//.
should be used rather than/test-module:*//*
.But after we replaced
*
with.
in our test applications, we started to observe the following error:libyang: Unexpected character(s) '*' (*//.).
It turned out that while lyd_get_node() processes this xpath just fine, ly_ctx_get_node() returns this error. Is there a difference between these two functions related to the input xpath that we should be aware of?
Thanks,
Milan
The text was updated successfully, but these errors were encountered: