From: Marc Cromme Date: Sun, 7 Jan 2007 15:55:02 +0000 (+0000) Subject: Added output of XML config dom tree to SRU explain. Still need to merge zeerex_explai... X-Git-Tag: METAPROXY.1.0.8~41 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=a130d7f7619fda29468cb4a1bfdbef955d4eab4d;p=metaproxy-moved-to-github.git Added output of XML config dom tree to SRU explain. Still need to merge zeerex_explain and sru_z3950 filter into one filter. --- diff --git a/src/sru_util.cpp b/src/sru_util.cpp index e116592..48e02b3 100644 --- a/src/sru_util.cpp +++ b/src/sru_util.cpp @@ -1,4 +1,4 @@ -/* $Id: sru_util.cpp,v 1.5 2007-01-07 00:41:18 marc Exp $ +/* $Id: sru_util.cpp,v 1.6 2007-01-07 15:55:02 marc Exp $ Copyright (c) 2005-2006, Index Data. See the LICENSE file for details @@ -158,7 +158,15 @@ bool mp_util::build_sru_explain(metaproxy_1::Package &package, "\n"); } else { - explain_xml = ""; + // make new XML DOC with given explain node + xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0"); + xmlDocSetRootElement(doc, (xmlNode*)explain); + + xmlChar *xmlbuff; + int xmlbuffsz; + xmlDocDumpFormatMemory(doc, &xmlbuff, &xmlbuffsz, 1); + + explain_xml.assign((const char*)xmlbuff, 0, xmlbuffsz); }