YAZ  5.23.1
Functions
marc_read_xml.c File Reference

Implements reading of MARC as XML. More...

#include <stdio.h>
#include <string.h>
#include <yaz/marcdisp.h>
#include <yaz/wrbuf.h>
#include <yaz/yaz-util.h>
#include <yaz/nmem_xml.h>
#include <libxml/tree.h>

Go to the source code of this file.

Functions

static int yaz_marc_read_xml_subfields (yaz_marc_t mt, const xmlNode *ptr)
 
static char * element_attribute_value_extract (const xmlNode *ptr, const char *attribute_name, NMEM nmem)
 
static void get_indicator_value (yaz_marc_t mt, const xmlNode *ptr, char *res, int turbo, int indicator_length)
 
static int yaz_marc_read_turbo_xml_subfields (yaz_marc_t mt, const xmlNode *ptr)
 
static int yaz_marc_read_xml_leader (yaz_marc_t mt, const xmlNode **ptr_p, int *indicator_length)
 
static int yaz_marc_read_xml_fields (yaz_marc_t mt, const xmlNode *ptr, int indicator_length)
 
static int yaz_marc_read_turbo_xml_fields (yaz_marc_t mt, const xmlNode *ptr, int indicator_length)
 
int yaz_marc_read_xml (yaz_marc_t mt, const xmlNode *ptr)
 parses MARCXML/MarcXchange/TurboMARC record from xmlNode pointer More...
 

Detailed Description

Implements reading of MARC as XML.

Definition in file marc_read_xml.c.

Function Documentation

static char* element_attribute_value_extract ( const xmlNode *  ptr,
const char *  attribute_name,
NMEM  nmem 
)
static
static void get_indicator_value ( yaz_marc_t  mt,
const xmlNode *  ptr,
char *  res,
int  turbo,
int  indicator_length 
)
static

Definition at line 108 of file marc_read_xml.c.

Referenced by yaz_marc_read_turbo_xml_fields(), and yaz_marc_read_xml_fields().

static int yaz_marc_read_turbo_xml_fields ( yaz_marc_t  mt,
const xmlNode *  ptr,
int  indicator_length 
)
static
static int yaz_marc_read_turbo_xml_subfields ( yaz_marc_t  mt,
const xmlNode *  ptr 
)
static
int yaz_marc_read_xml ( yaz_marc_t  mt,
const xmlNode *  ptr 
)

parses MARCXML/MarcXchange/TurboMARC record from xmlNode pointer

Parameters
mthandle
ptris a pointer to root xml node
Return values
0OK
-1ERROR

Definition at line 356 of file marc_read_xml.c.

References yaz_marc_cprintf(), YAZ_MARC_MARCXML, yaz_marc_read_turbo_xml_fields(), yaz_marc_read_xml_fields(), yaz_marc_read_xml_leader(), yaz_marc_reset(), and YAZ_MARC_TURBOMARC.

Referenced by bibliographicRecord(), and convert_marc().

static int yaz_marc_read_xml_fields ( yaz_marc_t  mt,
const xmlNode *  ptr,
int  indicator_length 
)
static
static int yaz_marc_read_xml_leader ( yaz_marc_t  mt,
const xmlNode **  ptr_p,
int *  indicator_length 
)
static

Definition at line 180 of file marc_read_xml.c.

References yaz_marc_cprintf(), and yaz_marc_set_leader().

Referenced by yaz_marc_read_xml().

static int yaz_marc_read_xml_subfields ( yaz_marc_t  mt,
const xmlNode *  ptr 
)
static