From a4558673e495030fe31c38ff403f879923860b5e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 26 Sep 2013 14:45:32 +0200 Subject: [PATCH] MARCXML parsing: avoid skipping 1st field if no leader YAZ-693 --- src/marc_read_xml.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/marc_read_xml.c b/src/marc_read_xml.c index 97e99e5..7356ca2 100644 --- a/src/marc_read_xml.c +++ b/src/marc_read_xml.c @@ -185,6 +185,7 @@ static int yaz_marc_read_xml_leader(yaz_marc_t mt, const xmlNode **ptr_p, for(; p; p = p->next) if (p->type == XML_TEXT_NODE) leader = (const char *) p->content; + ptr = ptr->next; } break; } @@ -415,9 +416,9 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr) switch (format) { case YAZ_MARC_MARCXML: - return yaz_marc_read_xml_fields(mt, ptr->next, indicator_length); + return yaz_marc_read_xml_fields(mt, ptr, indicator_length); case YAZ_MARC_TURBOMARC: - return yaz_marc_read_turbo_xml_fields(mt, ptr->next, indicator_length); + return yaz_marc_read_turbo_xml_fields(mt, ptr, indicator_length); } return -1; } -- 1.7.10.4