YAZ  5.34.0
Typedefs | Functions
marc_sax.h File Reference

Parsing MARCXML collection using Libxml2's SAX parser. More...

#include <yaz/yconfig.h>
#include <yaz/marcdisp.h>
#include <libxml/parser.h>

Go to the source code of this file.

Typedefs

typedef struct yaz_marc_sax_t_yaz_marc_sax_t
 

Functions

yaz_marc_sax_t yaz_marc_sax_new (yaz_marc_t mt, void(*cb)(yaz_marc_t mt, void *), void *cb_data)
 construct marc SAX parser More...
 
xmlSAXHandlerPtr yaz_marc_sax_get_handler (yaz_marc_sax_t ctx)
 return Libxml SAX handler pointer More...
 
void yaz_marc_sax_destroy (yaz_marc_sax_t ctx)
 destroys marc SAX parser More...
 

Detailed Description

Parsing MARCXML collection using Libxml2's SAX parser.

Definition in file marc_sax.h.

Typedef Documentation

◆ yaz_marc_sax_t

Definition at line 45 of file marc_sax.h.

Function Documentation

◆ yaz_marc_sax_destroy()

void yaz_marc_sax_destroy ( yaz_marc_sax_t  ctx)

destroys marc SAX parser

Parameters
ctx

Definition at line 164 of file marc_read_sax.c.

References yaz_marc_sax_t_::cdata, yaz_marc_sax_t_::indicators, yaz_marc_sax_t_::tag, wrbuf_destroy(), and xfree.

◆ yaz_marc_sax_get_handler()

xmlSAXHandlerPtr yaz_marc_sax_get_handler ( yaz_marc_sax_t  ctx)

return Libxml SAX handler pointer

Returns
pointer

Definition at line 159 of file marc_read_sax.c.

References yaz_marc_sax_t_::saxHandler.

◆ yaz_marc_sax_new()

yaz_marc_sax_t yaz_marc_sax_new ( yaz_marc_t  mt,
void(*)(yaz_marc_t mt, void *)  cb,
void *  cb_data 
)

construct marc SAX parser

Parameters
mtmarc handle
cbfunction called for each record
cb_datadata to be passed to each cb call