libyang  2.0.112
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Output Processing

libyang provides a mechanism to generalize work with the outputs (and inputs) of the different types. The ly_out handler can be created providing necessary information connected with the specific output type and then used throughout the printers functions. The API allows to combine output from libyang (data or schema) printers and output directly provided by the caller (via ly_print() or ly_write()).

Using a generic output handler avoids need to have a set of functions for each printer functionality and results in simpler API.

The API allows to alter the target of the data behind the handler by another target (of the same type). Also resetting a seekable output is possible with ly_out_reset() to re-write the output.

This mechanism was introduced in libyang 2.0. To simplify transition from libyang 1.0 to version 2.0 and also for some simple use case where using the output handler would be an overkill, there are some basic printer functions that do not require output handler. But remember, that functionality of these function can be limited in particular cases in contrast to the functions using output handlers.

Functions List

libyang Printers List