Simple C Expat Wrapper (SCEW)  1.1.7
Files | Functions
Memory

Write data to memory buffers. More...

Files

file  writer_buffer.h
 SCEW writer functions for memory buffers.
 

Functions

SCEW_API scew_writerscew_writer_buffer_create (XML_Char *buffer, size_t size)
 Creates a new SCEW writer for the given memory buffer of the specified size. More...
 

Detailed Description

Write data to memory buffers.

Function Documentation

SCEW_API scew_writer* scew_writer_buffer_create ( XML_Char *  buffer,
size_t  size 
)

Creates a new SCEW writer for the given memory buffer of the specified size.

The buffer should exist before calling this function and the size of the buffer should be large enough to store the desired information (e.g. an XML tree, an element...). Once the writer is created, any of the Writers functions might be called in order to store data to the buffer.

Precondition
buffer != NULL
size > 0
Parameters
bufferthe memory area where the new SCEW writer will write to.
sizethe size of the memory area.
Returns
a new SCEW writer for the given buffer or NULL if the writer could not be created.