* New XML parsing API:

* `clixon_xml_parse_string()`
   * `clixon_xml_parse_file()`
* New JSON parsing API, with same signature as XML parsing:
   * `clixon_json_parse_string()`
   * `clixon_xml_parse_file()`
* XML YANG binding API have been rearranged as follows:
   * `xml_bind_yang_rpc()`
   * `xml_bind_yang_rpc_reply()`
   * `xml_bind_yang()`
   * `xml_bind_yang0()`
This commit is contained in:
Olof hagsand 2020-03-19 21:32:27 +01:00
parent c4b0491754
commit 09a2e09848
54 changed files with 590 additions and 711 deletions

View file

@ -584,7 +584,7 @@ stream_notify(clicon_handle h,
/* From RFC5277 */
cprintf(cb, "<notification xmlns=\"%s\"><eventTime>%s</eventTime>%s</notification>",
NOTIFICATION_RFC5277_NAMESPACE, timestr, str);
if (xml_parse_string(cbuf_get(cb), yspec, &xev) < 0)
if (clixon_xml_parse_string(cbuf_get(cb), YB_MODULE, yspec, &xev, NULL) < 0)
goto done;
if (xml_rootchild(xev, 0, &xev) < 0)
goto done;
@ -649,7 +649,7 @@ stream_notify_xml(clicon_handle h,
cprintf(cb, "<notification xmlns=\"%s\"><eventTime>%s</eventTime>NULL</notification>",
NOTIFICATION_RFC5277_NAMESPACE,
timestr); /* XXX str is always NULL */
if (xml_parse_string(cbuf_get(cb), yspec, &xev) < 0)
if (clixon_xml_parse_string(cbuf_get(cb), YB_NONE, yspec, &xev, NULL) < 0)
goto done;
if (xml_rootchild(xev, 0, &xev) < 0)
goto done;