From 4d51df0eeb17c458c3bcd424a21842f05a8ed8b3 Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 14 Jun 2004 02:42:44 +0000 Subject: [PATCH] Add version and DTD to xml output spew. CVS patchset: 7316 CVS date: 2004/06/14 02:42:44 --- tools/rpmtool.c | 16 +++++++++++++++- tools/time.xml | 3 +-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/rpmtool.c b/tools/rpmtool.c index b13cad9..8089924 100644 --- a/tools/rpmtool.c +++ b/tools/rpmtool.c @@ -8,6 +8,18 @@ #include "misc.h" #include "debug.h" +static const char * rpmxpDTD = "\ +\n\ +\n\ +\n\ +\n\ +\n\ +\n\ +\n\ +]>\n\ +"; + typedef enum rpmtoolComponentBits_e { RPMTOOL_NONE = 0, RPMTOOL_LEAD = (1 << 0), @@ -220,8 +232,10 @@ fprintf(stderr, "*** Fopen(%s,w.ufdio)\n", (ofn != NULL ? ofn : "-")); s = "[%{*:xml}\n]"; t = headerSprintf(h, s, rpmTagTable, rpmHeaderFormats, &errstr); - if (t != NULL) + if (t != NULL) { + Fwrite(rpmxpDTD, strlen(rpmxpDTD), 1, fdo); Fwrite(t, strlen(t), 1, fdo); + } t = _free(t); } else headerWrite(fdo, h, HEADER_MAGIC_YES); diff --git a/tools/time.xml b/tools/time.xml index d03f384..4fde1b1 100644 --- a/tools/time.xml +++ b/tools/time.xml @@ -2,8 +2,7 @@ - + -- 2.7.4