libyang
1.0.253
YANG data modeling language library
|
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 |
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.
#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.
#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.
#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.
#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
#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).