X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmarc_read_xml.c;h=31a718b5fe89c916046709e932df2223273dd2bf;hb=1b9e01d65c2e5a8b805c132bc1a043dc4d2c3ec5;hp=caf5a5573a28a791b08dc2f93d94184b5bd8ca59;hpb=fe507b6b15788a3a8e58063d9dae52532a5229a5;p=yaz-moved-to-github.git diff --git a/src/marc_read_xml.c b/src/marc_read_xml.c index caf5a55..31a718b 100644 --- a/src/marc_read_xml.c +++ b/src/marc_read_xml.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: marc_read_xml.c,v 1.3 2007-05-06 20:12:20 adam Exp $ + * $Id: marc_read_xml.c,v 1.4 2007-12-17 20:59:30 adam Exp $ */ /** @@ -118,7 +118,6 @@ static int yaz_marc_read_xml_leader(yaz_marc_t mt, const xmlNode **ptr_p) { yaz_marc_cprintf( mt, "Expected element 'leader', got '%.80s'", ptr->name); - return -1; } } if (!leader) @@ -194,7 +193,6 @@ static int yaz_marc_read_xml_fields(yaz_marc_t mt, const xmlNode *ptr) yaz_marc_cprintf( mt, "Bad attribute '%.80s' for 'datafield'", attr->name); - return -1; } if (!ptr_tag) { @@ -224,6 +222,8 @@ static int yaz_marc_read_xml_fields(yaz_marc_t mt, const xmlNode *ptr) int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr) { #if YAZ_HAVE_XML2 + yaz_marc_reset(mt); + for(; ptr; ptr = ptr->next) if (ptr->type == XML_ELEMENT_NODE) {