format the outputted reg.xml for libxml2. if anything causes your xml probs in the...
authorAndy Wingo <wingo@pobox.com>
Tue, 25 Dec 2001 22:57:31 +0000 (22:57 +0000)
committerAndy Wingo <wingo@pobox.com>
Tue, 25 Dec 2001 22:57:31 +0000 (22:57 +0000)
Original commit message from CVS:
format the outputted reg.xml for libxml2. if anything causes your xml probs in the
future, this is probably it...

tools/gstreamer-compprep.c
tools/gstreamer-register.c

index 9fc5716..40eb151 100644 (file)
@@ -42,6 +42,8 @@ int main(int argc,char *argv[]) {
       xmlNewChild (factorynode, NULL, "name", gst_object_get_name (GST_OBJECT (factory)));
 
       element = gst_elementfactory_create(factory,"element");
+      fprintf(stderr,"adding factory %s\n", 
+              gst_object_get_name (GST_OBJECT (factory)));
       if (element == NULL) {
         fprintf(stderr,"couldn't construct element from factory %s\n", 
                        gst_object_get_name (GST_OBJECT (factory)));
index d94e252..32540f4 100644 (file)
@@ -167,7 +167,12 @@ static void save_registry(const char *destfile,
     }
 
 #else
+#ifdef HAVE_LIBXML2
+    /* indent the document */
+    if (xmlSaveFormatFile(destfile, *doc, 1) <= 0) {
+#else
     if (xmlSaveFile(destfile, *doc) <= 0) {
+#endif
        g_print("Cannot save new registry to `%s'", destfile);
        error_perm();
     }