C-API: clixon_xml2file and clixon_xml2cbuf added prefix argument

Added in-mem xml diff function: `xml_tree_diff_print`
This commit is contained in:
Olof hagsand 2023-04-12 09:54:37 +02:00
parent 819a0b5a9e
commit 6335f810d3
43 changed files with 309 additions and 149 deletions

View file

@ -373,7 +373,7 @@ example_rpc(clicon_handle h, /* Clicon handle */
if (xmlns_set(x, NULL, namespace) < 0)
goto done;
}
if (clixon_xml2cbuf(cbret, xe, 0, 0, -1, 1) < 0)
if (clixon_xml2cbuf(cbret, xe, 0, 0, NULL, -1, 1) < 0)
goto done;
}
cprintf(cbret, "</rpc-reply>");

View file

@ -74,7 +74,7 @@ mycallback(clicon_handle h, cvec *cvv, cvec *argv)
nsc, NULL,
&xret) < 0)
goto done;
if (clixon_xml2file(stdout, xret, 0, 1, cligen_output, 0, 1) < 0)
if (clixon_xml2file(stdout, xret, 0, 1, NULL, cligen_output, 0, 1) < 0)
goto done;
retval = 0;
done:
@ -119,7 +119,7 @@ example_client_rpc(clicon_handle h,
goto done;
}
/* Print result */
if (clixon_xml2file(stdout, xml_child_i(xret, 0), 0, 0, cligen_output, 0, 1) < 0)
if (clixon_xml2file(stdout, xml_child_i(xret, 0), 0, 0, NULL, cligen_output, 0, 1) < 0)
goto done;
fprintf(stdout,"\n");

View file

@ -90,7 +90,7 @@ netconf_client_rpc(clicon_handle h,
if (xmlns_set(x, NULL, namespace) < 0)
goto done;
}
if (clixon_xml2cbuf(cbret, xe, 0, 0, -1, 1) < 0)
if (clixon_xml2cbuf(cbret, xe, 0, 0, NULL, -1, 1) < 0)
goto done;
}
cprintf(cbret, "</rpc-reply>");

View file

@ -330,7 +330,7 @@ restconf_client_rpc(clicon_handle h,
if (xmlns_set(x, NULL, namespace) < 0)
goto done;
}
if (clixon_xml2cbuf(cbret, xe, 0, 0, -1, 1) < 0)
if (clixon_xml2cbuf(cbret, xe, 0, 0, NULL, -1, 1) < 0)
goto done;
}
cprintf(cbret, "</rpc-reply>");