+/** \brief read ISO2709/MARC record from buffer
+ \param mt handle
+ \param buf ISO2709 buffer of size bsize
+ \param bsize size of buffer (-1 for unlimited size)
+
+ Parses ISO2709 record from supplied buffer
+ Returns > 0 for OK (same as length), -1=ERROR
+*/
+YAZ_EXPORT int yaz_marc_read_iso2709(yaz_marc_t mt,
+ const char *buf, int bsize);
+
+/** \brief parses MARCXML/MarcXchange record from xmlNode pointer
+ \param mt handle
+ \param xmlnode is a pointer to root xmlNode pointer
+
+ Returns 0=OK, -1=ERROR
+*/
+YAZ_EXPORT int yaz_marc_read_xml(yaz_marc_t mt, const void *xmlnode);
+
+/** \brief writes record in line format
+ \param mt handle
+ \param wrbuf WRBUF for output
+
+ Returns 0=OK, -1=ERROR
+*/
+YAZ_EXPORT int yaz_marc_write_line(yaz_marc_t mt, WRBUF wrbuf);
+
+/** \brief writes record in MARCXML format
+ \param mt handle
+ \param wrbuf WRBUF for output
+
+ Sets leader[9]='a' . Returns 0=OK, -1=ERROR .
+*/
+
+YAZ_EXPORT int yaz_marc_write_marcxml(yaz_marc_t mt, WRBUF wrbuf);
+
+/** \brief writes record in MarcXchange XML
+ \param mt handle
+ \param wrbuf WRBUF for output
+ \param format record format (e.g. "MARC21")
+ \param type record type (e.g. Bibliographic)
+
+ Returns 0=OK, -1=ERROR
+*/
+YAZ_EXPORT int yaz_marc_write_marcxchange(yaz_marc_t mt, WRBUF wrbuf,
+ const char *format,
+ const char *type);
+
+/** \brief writes record in ISO2709 format
+ \param mt handle
+ \param wrbuf WRBUF for output
+ Returns 0=OK, -1=ERROR
+*/
+YAZ_EXPORT int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wrbuf);
+
+/** \brief writes record in mode - given by yaz_marc_xml mode
+ \param mt handle
+ \param wrbuf WRBUF for output
+ This function calls yaz_marc_write_iso2709, yaz_marc_write_marcxml,
+ etc.. depending on mode given by yaz_marc_xml.
+ Returns 0=OK, -1=ERROR
+*/
+YAZ_EXPORT int yaz_marc_write_mode(yaz_marc_t mt, WRBUF wrbuf);
+