CESNET / libnetconf

C NETCONF library
Other
113 stars 84 forks source link

libnetconf only support subtree filter ,not xpath fliter? #265

Closed zyboy2000 closed 7 years ago

zyboy2000 commented 7 years ago

filter xmlns:t="http://example.com...." type="xpath" select ="/t:top/t:name['fred']"/

i send this rpc ,return error ,follow code , find netconf.h

typedef enum NC_FILTER_TYPE { NC_FILTER_UNKNOWN, NC_FILTER_SUBTREE }NC_FILTER_TYPE

so libnetconf only support subtree filter ,not xpath fliter? libnetconf2 support all

rkrejci commented 7 years ago

correct

zyboy2000 commented 7 years ago

but libxml2 has xpath fuction,why not support?if i want xpath fuction,only change to libneconf2?no others way?

michalvasko commented 7 years ago

Just because libxml2 supports XPath on XML, it does not mean it is simple to implement it for YANG data. So yeah, switch to libnetconf2 or perhaps send us a patch that adds XPath support for libnetconf, I see no other way.

Regards, Michal