[xml] xml prologue output

Dear all,
I am using prelude-manager (www.prelude-ids.com/en) that uses an xml report plugin (xmlmod.c; https://trac.prelude-ids.org/browser/prelude-manager/trunk/plugins/reports/xmlmod/xmlmod.c).
My issue is the following: the XML prologue (typically I am looking for <?xml version="1.0" encoding="iso-8859-1"?>) but the xmlmod report plugin does not write it. I would like to have it explicitly written.
I asked the prelude-manager mailing list but they say that I should contact the libxml2 mailing list.
Could you please give me helpful advice?
I have looked at the xmlNodeDumpOutput and xmlNewDoc functions but did not identify what could be the issue
static void dump_document(xmlmod_plugin_t *plugin, xmlDoc *doc)
        xmlNodeDumpOutput(plugin->fd, doc, doc->children, 0, plugin->format, NULL);
        if ( plugin->format )
                xmlOutputBufferWriteString(plugin->fd, "\n");
        if ( plugin->no_buffering )
        if ( plugin->idmef_dtd )
                validate_dtd(plugin, doc);
static int xmlmod_run(prelude_plugin_instance_t *pi, idmef_message_t *message)
        xmlNodePtr root;
        xmlDoc *document;
        xmlmod_plugin_t *plugin = prelude_plugin_instance_get_plugin_data(pi);
        document = xmlNewDoc((const xmlChar *) "1.0");
        if ( ! document ) {
                prelude_log(PRELUDE_LOG_ERR, "error creating XML document.\n");
                return -1;
        root = xmlNewDocNode(document, NULL, (const xmlChar *) "IDMEF-Message", NULL);
        if ( ! root ) {
                return -1;
Any help would be welcomed.
Thank you.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]