The simplest thing to do with a retrieved record is simply to
render() it. This returns a human-readable, but
not necessarily very pretty, representation of the contents of the
record. This is useful primarily for testing and debugging, since
the application has no control over how the record appears.
(The application must not
delete the returned string - it is ``owned'' by
the record object.)
More sophisticated applications will want to deal with the raw data
themselves: the rawdata() method returns it.
Its format will vary depending on the record syntax: SUTRS, MARC
and XML records are returned ``as is'', and GRS-1 records as a
pointer to their top-level node, which is a
Z_GenericRecord structure as defined in the
<yaz/z-grs.h> header file.
(The application must not
delete the returned data - it is ``owned'' by
the record object.)
Perceptive readers will notice that there are no methods for access
to individual fields within a record. That's because the different
record syntaxes are so different that there is no even a uniform
notion of what a field is across them all, let alone a sensible way
to implement such a function. Fetch the raw data instead, and pick
it apart ``by hand''.