- if (yaz_marc_decode ((const char *)
- r->u.octet_aligned->buf,
- rec->wrbuf_marc, 0,
- r->u.octet_aligned->len,
- marc_decode_type) > 0)
+ mt = yaz_marc_create();
+
+ yaz_marc_xml(mt, YAZ_MARC_MARCXML);
+ if (yaz_marc_decode_wrbuf (
+ mt, (const char *) r->u.octet_aligned->buf,
+ r->u.octet_aligned->len,
+ rec->wrbuf_marc) > 0)