diff --git a/src/main.c b/src/main.c
index f80bc00..92d3962 100644
--- a/src/main.c
+++ b/src/main.c
@@ -105,7 +105,6 @@ main (int argc, char **argv)
sys->argv = argv;
process_switches (sys);
- // exit (0); // TODO FIX weghalen [x][cc]
/* init compiler for this system */
compilerInit (sys);
@@ -192,6 +191,10 @@ main (int argc, char **argv)
* ---------------------------------------
*/
+ /* xml init */
+ if (sys->switchXMLoutput)
+ xmlOutInit ();
+
/* latex header? */
if (sys->latex)
latexInit (sys, argc, argv);
@@ -242,6 +245,10 @@ main (int argc, char **argv)
if (sys->latex)
latexDone (sys);
+ /* xml closeup */
+ if (sys->switchXMLoutput)
+ xmlOutDone ();
+
/* Transfer any scenario counting to the exit code,
* assuming that there is no error. */
if (exitcode != EXIT_ERROR && sys->switchScenario < 0)
diff --git a/src/xmlout.c b/src/xmlout.c
index 9fed897..e1f0a51 100644
--- a/src/xmlout.c
+++ b/src/xmlout.c
@@ -33,13 +33,15 @@ static int xmlindent; // indent level for xml elements in output
void
xmlOutInit (void)
{
- xmlindent = 0;
+ printf ("\n");
+ xmlindent = 1;
}
//! Close up
void
xmlOutDone (void)
{
+ printf ("\n");
}
/*
@@ -55,7 +57,7 @@ xmlIndentPrint ()
i = xmlindent;
while (i > 0)
{
- printf (" ");
+ printf (" ");
i--;
}
}
@@ -319,7 +321,7 @@ xmlOutBindings (const System sys)
xmlIndentPrint ();
printf ("term);
- printf ("\" />\n");
+ printf ("\" >\n");
xmlindent++;
if (b->done)
xmlRunIndex ("from", b->run_from, b->ev_from);