Simple C Expat Wrapper (SCEW)
1.1.7
|
A set of routines to print XML data. More...
Files | |
file | printer.h |
SCEW printer routines for XML output. | |
Functions | |
SCEW_API scew_writer * | scew_printer_set_writer (scew_printer *printer, scew_writer *writer) |
Sets the given SCEW writer to the specified printer. More... | |
SCEW_API scew_bool | scew_printer_print_tree (scew_printer *printer, scew_tree const *tree) |
Prints the given SCEW tree to the specified printer. More... | |
SCEW_API scew_bool | scew_printer_print_element (scew_printer *printer, scew_element const *element) |
Prints the given SCEW element to the specified printer. More... | |
SCEW_API scew_bool | scew_printer_print_element_children (scew_printer *printer, scew_element const *element) |
Prints the given SCEW element children to the specified printer. More... | |
SCEW_API scew_bool | scew_printer_print_element_attributes (scew_printer *printer, scew_element const *element) |
Prints the given SCEW element attributes to the specified printer. More... | |
SCEW_API scew_bool | scew_printer_print_attribute (scew_printer *printer, scew_attribute const *attribute) |
Prints the given SCEW attribute to the specified printer. More... | |
A set of routines to print XML data.
SCEW_API scew_writer* scew_printer_set_writer | ( | scew_printer * | printer, |
scew_writer * | writer | ||
) |
Sets the given SCEW writer to the specified printer.
After this call, subsequent calls to output functions will use the given writer internally. This means that the printer can be used to writer to a file or memory buffer indistinctly.
printer | the SCEW printer to change its writer for. |
writer | the SCEW writer to be used in next output calls. |
SCEW_API scew_bool scew_printer_print_tree | ( | scew_printer * | printer, |
scew_tree const * | tree | ||
) |
Prints the given SCEW tree to the specified printer.
This will print the XML declaration, the preamble and the root element with all its children.
printer | the printer to be used for printing data. |
tree | the SCEW tree to print. |
SCEW_API scew_bool scew_printer_print_element | ( | scew_printer * | printer, |
scew_element const * | element | ||
) |
Prints the given SCEW element to the specified printer.
This will print the element (with its attributes) and all its children recursively.
printer | the printer to be used for printing data. |
element | the SCEW element to print. |
SCEW_API scew_bool scew_printer_print_element_children | ( | scew_printer * | printer, |
scew_element const * | element | ||
) |
Prints the given SCEW element children to the specified printer.
This will print the element children recursively.
printer | the printer to be used for printing data. |
element | the SCEW element to print its children for. The element itself is not printed. |
SCEW_API scew_bool scew_printer_print_element_attributes | ( | scew_printer * | printer, |
scew_element const * | element | ||
) |
Prints the given SCEW element attributes to the specified printer.
This will print the list of the element attributes. Note that this will note generate any valid XML data, but might be useful in some cases.
printer | the printer to be used for printing data. |
element | the SCEW element to print its attributes for. |
SCEW_API scew_bool scew_printer_print_attribute | ( | scew_printer * | printer, |
scew_attribute const * | attribute | ||
) |
Prints the given SCEW attribute to the specified printer.
Note that this will note generate any valid XML data, but might be useful in some cases.
printer | the printer to be used for printing data. |
attribute | the SCEW attribute to print. |