Skip to content
Discussion options

You must be logged in to vote

What you want to do, in short, is transform those paths into XPath. That should work in the following way:

Predicates such as [name=*] can simply be [name] I think but using an arbitrary string works fine, too.

Skipping path elements /.../ should have its XPath equivalent as //.

Not sure what exactly /*/ is supposed to mean but it is valid in XPath and means a single arbitrary element.

However, lys_find_path() is probably not the function to use because it accepts only path (simplified XPath) and the last 2 cases are not supported for that. You should probably switch to lys_find_xpath() that accepts full XPath (to the extent supported by libyang).

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@breifman
Comment options

@michalvasko
Comment options

Answer selected by breifman
Comment options

You must be logged in to vote
3 replies
@michalvasko
Comment options

@breifman
Comment options

@michalvasko
Comment options

Comment options

You must be logged in to vote
1 reply
@michalvasko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants