2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: tstxmlquery.c,v 1.2 2006-01-27 18:58:58 adam Exp $
11 #include <yaz/wrbuf.h>
12 #include <yaz/xmlquery.h>
13 #include <yaz/pquery.h>
17 static void pqf2xml_text(const char *pqf)
19 YAZ_PQF_Parser parser = yaz_pqf_create();
20 ODR odr = odr_createmem(ODR_ENCODE);
27 rpn = yaz_pqf_parse(parser, odr, pqf);
31 yaz_pqf_destroy(parser);
33 Z_Query *query = odr_malloc(odr, sizeof(*query));
34 query->which = Z_Query_type_1;
35 query->u.type_1 = rpn;
41 int main (int argc, char **argv)
43 YAZ_CHECK_INIT(argc, argv);
45 pqf2xml_text("@attr 1=4 computer");
54 * indent-tabs-mode: nil
56 * vim: shiftwidth=4 tabstop=8 expandtab