YAZ
5.34.0
|
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... | |
Implements reading of MARC as XML.
Definition in file marc_read_xml.c.
|
static |
Definition at line 92 of file marc_read_xml.c.
References name, nmem_strdup(), and nmem_text_node_cdata().
Referenced by yaz_marc_read_turbo_xml_fields(), and yaz_marc_read_turbo_xml_subfields().
|
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 |
Definition at line 296 of file marc_read_xml.c.
References element_attribute_value_extract(), get_indicator_value(), nmem_malloc(), yaz_marc_add_controlfield_xml2(), yaz_marc_add_datafield_xml2(), yaz_marc_cprintf(), yaz_marc_get_nmem(), and yaz_marc_read_turbo_xml_subfields().
Referenced by yaz_marc_read_xml().
|
static |
Definition at line 134 of file marc_read_xml.c.
References element_attribute_value_extract(), nmem_malloc(), yaz_marc_add_subfield(), yaz_marc_cprintf(), and yaz_marc_get_nmem().
Referenced by yaz_marc_read_turbo_xml_fields().
int yaz_marc_read_xml | ( | yaz_marc_t | mt, |
const xmlNode * | ptr | ||
) |
parses MARCXML/MarcXchange/TurboMARC record from xmlNode pointer
mt | handle |
ptr | is a pointer to root xml node |
0 | OK |
-1 | ERROR |
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 |
Definition at line 227 of file marc_read_xml.c.
References get_indicator_value(), yaz_marc_add_controlfield_xml(), yaz_marc_add_datafield_xml(), yaz_marc_cprintf(), and yaz_marc_read_xml_subfields().
Referenced by yaz_marc_read_xml().
|
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 |
Definition at line 31 of file marc_read_xml.c.
References nmem_malloc(), yaz_marc_add_subfield(), yaz_marc_cprintf(), and yaz_marc_get_nmem().
Referenced by yaz_marc_read_xml_fields().