Output
[Printer]

A set of routines to print XML data. More...

Files

file  printer.h
 

SCEW printer routines for XML output.


Functions

SCEW_API scew_writerscew_printer_set_writer (scew_printer *printer, scew_writer *writer)
 Sets the given SCEW writer to the specified printer.
SCEW_API scew_bool scew_printer_print_tree (scew_printer *printer, scew_tree const *tree)
 Prints the given SCEW tree to the specified printer.
SCEW_API scew_bool scew_printer_print_element (scew_printer *printer, scew_element const *element)
 Prints the given SCEW element to the specified printer.
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.
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.
SCEW_API scew_bool scew_printer_print_attribute (scew_printer *printer, scew_attribute const *attribute)
 Prints the given SCEW attribute to the specified printer.

Detailed Description

A set of routines to print XML data.


Function Documentation

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.

Parameters:
printer the SCEW printer to change its writer for.
writer the SCEW writer to be used in next output calls.
Returns:
the old SCEW writer.
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.

Precondition:
printer != NULL
tree != NULL
Parameters:
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.

Precondition:
printer != NULL
element != NULL
Parameters:
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.

Precondition:
printer != NULL
element != NULL
Parameters:
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.

Precondition:
printer != NULL
element != NULL
Parameters:
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.

Precondition:
printer != NULL
attribute != NULL
Parameters:
printer the printer to be used for printing data.
attribute the SCEW attribute to print.

Generated on Fri Dec 11 19:50:26 2009 for Simple C Expat Wrapper (SCEW) by  doxygen 1.6.1