You can use SOIF buffers in parsing or printing routines. They take care of memory allocation for inserting and appending. They are basically memory blocks that are easy for SOIF routines to use.
A SOIF Buffer is represented in a SOIFBuffer structure, that is created with the SOIFBuffer_Create() function and freed with the SOIFBuffer-Free() function. The SOIFBuffer structure provides the append(), increase(), and reset() functions for manipulating the data in the buffer.
NSAPI_PUBLIC SOIFBuffer *SOIFBuffer_Create(int default_sz);
The SOIFBuffer is used in SOIF_PrintInitStr(SOIFBuffer *memory). Before you can print SOIF to memory, you need to create a buffer for output.
NSAPI_PUBLIC void SOIFBuffer_Free(SOIFBuffer *sb);
Releases the memory buffer created by SOIFBuffer_Create().
void (*append)(SOIFBuffer *sb, char *data, int n)
Copies n bytes of data into the buffer.
void (*increase)(SOIFBuffer *sb, int add_n)
Increases the size of the data buffer by add_n bytes.
void (*reset)(SOIFBuffer *sb)
Resets the size of the data buffer and invalidates all currently valid data. A buffer can be reused by resetting it this way.