07-09-2021 08:07 AM
Does anybody know if the NSO docs contain a section with a list of supported xpath operators (contains, starts-with....)
https://www.tutorialspoint.com/xpath/xpath_operators.htm
I looked over the docs and couldn't find anything specific. Running some restconf immediate-queriers and they fail with some operators. Want to verify they are either not supported or my query expression is wrong.
Solved! Go to Solution.
07-09-2021 08:52 AM
07-09-2021 08:52 AM
07-09-2021 09:03 AM
Nice. Thats what I was after. Thanks
07-12-2021 06:42 AM
Remember that you can evaluate xpath expressions in NSO:
admin@ncs> set devtools true
[ok][2021-07-12 15:37:48]
admin@ncs>config
admin@ncs% xpath eval "10 div 2"
5
[ok][2021-07-12 15:40:30]
[edit]
admin@ncs%
admin@ncs% xpath eval 1=1
true
[ok][2021-07-12 15:38:55]
[edit]
admin@ncs%
admin@ncs% xpath eval ceiling(2.5)
3
[ok][2021-07-12 15:42:01]
[edit]
admin@ncs%
07-13-2021 06:34 AM
Was not aware of this, very cool.
07-13-2021 07:15 AM
08-10-2021 08:01 AM
Hello @vleijon,
Do you have an update about the introduction to XPath ?
I am really interested in knowing more since documentation on this suject in NCS is very limited and it looks like what one can find on the internet does not cover the whole capacity of XPath in NCS.
Thanks in advance.
Rahenda
08-10-2021 08:44 AM
08-10-2021 08:54 AM - edited 08-10-2021 08:55 AM
@vleijonOk noted, thank you ! I'll keep checking for updates then.
In the meantime,
I am looking for a way to combine XPath filter with tree navigation such as :
/ncs:devices/ncs:device/commit-queue[queue-length!=0 AND ../../device-type/*/ned-id="lsa-netconf"]/queue-length
As far as I know, the given tutorialspoint link above does not cover such use case. Maybe do you have any idea on how to achieve this ?
Thanks in advance.
08-10-2021 09:29 AM
08-11-2021 07:47 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide