Changed C-API for xml translation/print the internal cxobj tree data structure to other formats
New API is as follows: * `clixon_xml2file()` - Print internal tree as XML to file * `clixon_xml2cbuf()` - Print internal tree as XML to buffer * `clixon_json2file()` - Print internal tree as JSON to file * `clixon_json2cbuf()` - Print internal tree as JSON to buffer * `clixon_cli2file()` - Print internal tree as CLI format to file * `clixon_txt2file()` - Print internal tree as text format to file
This commit is contained in:
parent
87719c623c
commit
0c79298e76
49 changed files with 421 additions and 503 deletions
|
|
@ -368,6 +368,7 @@ clixon_xvec_rm_pos(clixon_xvec *xv,
|
|||
* @param[in] f UNIX output stream
|
||||
* @param[in] xv XML tree vector
|
||||
* @retval 0 OK
|
||||
* @retval -1 Error
|
||||
*/
|
||||
int
|
||||
clixon_xvec_print(FILE *f,
|
||||
|
|
@ -376,7 +377,8 @@ clixon_xvec_print(FILE *f,
|
|||
int i;
|
||||
|
||||
for (i=0; i<xv->xv_len; i++)
|
||||
clicon_xml2file(f, xv->xv_vec[i], 0, 1);
|
||||
if (clixon_xml2file(f, xv->xv_vec[i], 0, 1, fprintf, 0) < 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue