libyang  1.0.253
YANG data modeling language library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
XML printer options
Collaboration diagram for XML printer options:

Macros

#define LYXML_PRINT_OPEN   0x01
 
#define LYXML_PRINT_FORMAT   0x02
 
#define LYXML_PRINT_CLOSE   0x04
 
#define LYXML_PRINT_ATTRS   0x08
 
#define LYXML_PRINT_SIBLINGS   0x10
 
#define LYXML_PRINT_NO_LAST_NEWLINE   0x20
 

Detailed Description

Various options to change behavior of XML dump functions (lyxml_print_*()).

When no option is specified (value 0), dumper prints all the content at once.

Macro Definition Documentation

#define LYXML_PRINT_OPEN   0x01

print only the open part of the XML element. If used in combination with LYXML_PRINT_CLOSE, it prints the element without its children: <element/>. If none of these two options is used, the element is printed including all its children.

Definition at line 175 of file xml.h.

#define LYXML_PRINT_FORMAT   0x02

format the output. If option is not used, the element and its children are printed without indentantion. If used in combination with LYXML_PRINT_CLOSE or LYXML_PRINT_ATTRS or LYXML_PRINT_OPEN, it has no effect.

Definition at line 182 of file xml.h.

#define LYXML_PRINT_CLOSE   0x04

print only the closing part of the XML element. If used in combination with LYXML_PRINT_OPEN, it prints the element without its children: <element/>. If none of these two options is used, the element is printed including all its children.

Definition at line 189 of file xml.h.

#define LYXML_PRINT_ATTRS   0x08

dump only attributes and namespace declarations of the element (element name is not printed). This option cannot be used in combination with LYXML_PRINT_OPEN and/or LYXML_PRINT_CLOSE

Definition at line 196 of file xml.h.

#define LYXML_PRINT_SIBLINGS   0x10

dump all top-level siblings. By default, the given XML element is supposed to be the only root element (and document is supposed to be well-formed XML). With this option the printer consider that the given XML element can has some sibling elements and print them all (so the given element is not necessarily printed as the first one).

Definition at line 201 of file xml.h.

#define LYXML_PRINT_NO_LAST_NEWLINE   0x20

makes sense only combined with LYXML_PRINT_FORMAT and causes the very last newline not to be printed - necessary for correct anyxml XML structure print.

Definition at line 210 of file xml.h.