From: Mike Taylor Date: Mon, 8 Dec 2003 14:37:23 +0000 (+0000) Subject: Essentially identical to the canonical ZOOM client listed on the X-Git-Tag: YAZPP.0.7.4.larry~30 X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=commitdiff_plain;h=e66e1480f40a782000c79c76815ac25a691b661d Essentially identical to the canonical ZOOM client listed on the ZOOM web-site's C++ Binding page. Apart from formatting tweaks, the only different is the use of the stupid "std::" prefix in front of all the strings, couts, etc. --- diff --git a/zoom/canonical.cpp b/zoom/canonical.cpp new file mode 100644 index 0000000..940ae6a --- /dev/null +++ b/zoom/canonical.cpp @@ -0,0 +1,16 @@ +/* g++ -g -o canonical canonical.cpp -lyaz++ -lyaz -lxml2 */ + +#include +#include + +using namespace ZOOM; + +int main(int argc, char **argv) +{ + connection conn("z3950.loc.gov", 7090); + conn.option("databaseName", "Voyager"); + conn.option("preferredRecordSyntax", "USMARC"); + resultSet rs(conn, prefixQuery("@attr 1=7 0253333490")); + const record rec(rs, 0); + std::cout << rec.render() << std::endl; +}