/*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2006, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: srw.c,v 1.45 2006-05-07 14:31:30 adam Exp $
+ * $Id: srw.c,v 1.48 2006-08-18 06:30:05 adam Exp $
*/
/**
* \file srw.c
*/
#include <yaz/srw.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
if (method->type != XML_ELEMENT_NODE)
return -1;
- *p = (Z_SRW_PDU *) odr_malloc(o, sizeof(**p));
- (*p)->srw_version = odr_strdup(o, "1.1");
- (*p)->username = 0;
- (*p)->password = 0;
+ *p = yaz_srw_get_core_v_1_1(o);
if (!xmlStrcmp(method->name, BAD_CAST "searchRetrieveRequest"))
{
if (method->type != XML_ELEMENT_NODE)
return -1;
- *p = (Z_SRW_PDU *) odr_malloc(o, sizeof(**p));
- (*p)->srw_version = odr_strdup(o, "1.1");
+ *p = yaz_srw_get_core_v_1_1(o);
if (!xmlStrcmp(method->name, BAD_CAST "updateRequest"))
{