| Gnome XML Library Reference Manual |
|---|
xmlIO —
int (*xmlInputMatchCallback) (char const *filename); void* (*xmlInputOpenCallback) (char const *filename); int (*xmlInputReadCallback) (void *context, char *buffer, int len); int (*xmlInputCloseCallback) (void *context); int (*xmlOutputMatchCallback) (char const *filename); void* (*xmlOutputOpenCallback) (char const *filename); int (*xmlOutputWriteCallback) (void *context, const char *buffer, int len); int (*xmlOutputCloseCallback) (void *context); struct xmlParserInputBuffer; struct xmlOutputBuffer;
int (*xmlInputMatchCallback) (char const *filename);
Callback used in the I/O Input API to detect if the current handler can provide input fonctionnalities for this resource.
| filename: | the filename or URI |
| Returns : | 1 if yes and 0 if another Input module should be used |
void* (*xmlInputOpenCallback) (char const *filename);
Callback used in the I/O Input API to open the resource
| filename: | the filename or URI |
int (*xmlInputReadCallback) (void *context,
char *buffer,
int len);Callback used in the I/O Input API to read the resource
| context: | an Input context |
| buffer: | the buffer to store data read |
| len: | the length of the buffer in bytes |
| Returns : | the number of bytes read or -1 in case of error |
int (*xmlInputCloseCallback) (void *context);
Callback used in the I/O Input API to close the resource
| context: | an Input context |
| Returns : | 0 or -1 in case of error |
int (*xmlOutputMatchCallback) (char const *filename);
Callback used in the I/O Output API to detect if the current handler can provide output fonctionnalities for this resource.
| filename: | the filename or URI |
| Returns : | 1 if yes and 0 if another Output module should be used |
void* (*xmlOutputOpenCallback) (char const *filename);
Callback used in the I/O Output API to open the resource
| filename: | the filename or URI |
int (*xmlOutputWriteCallback) (void *context,
const char *buffer,
int len);Callback used in the I/O Output API to write to the resource
| context: | an Output context |
| buffer: | the buffer of data to write |
| len: | the length of the buffer in bytes |
| Returns : | the number of bytes written or -1 in case of error |
int (*xmlOutputCloseCallback) (void *context);
Callback used in the I/O Output API to close the resource
| context: | an Output context |
| Returns : | 0 or -1 in case of error |
struct xmlParserInputBuffer {
void* context;
xmlInputReadCallback readcallback;
xmlInputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
int error;
};
struct xmlOutputBuffer {
void* context;
xmlOutputWriteCallback writecallback;
xmlOutputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
xmlBufferPtr conv; /* if encoder != NULL buffer for output */
int written; /* total number of byte written */
int error;
};
| << xmlmemory | xpath >> |