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
|
|
@ -145,7 +145,7 @@ int example_rpc(clicon_handle h,
|
|||
if (xmlns_set(x, NULL, ns) < 0)
|
||||
goto done;
|
||||
}
|
||||
if (clicon_xml2cbuf(cbret, xe, 0, 0, -1, 1) < 0)
|
||||
if (clixon_xml2cbuf(cbret, xe, 0, 0, -1, 1) < 0)
|
||||
goto done;
|
||||
}
|
||||
cprintf(cbret, "</rpc-reply>");
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ set xpath [lindex $argv 1]
|
|||
set line1 [lindex $argv 2]
|
||||
set line2 [lindex $argv 3]
|
||||
|
||||
set timeout 15
|
||||
|
||||
spawn clixon_cli -f $cfg
|
||||
|
||||
send "show pagination xpath $xpath cli\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue