about summary refs log tree commit diff
path: root/src/nix-env/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-08-16T10·32+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-08-16T10·32+0000
commit18e4ac0fc6bd1bc01d92d011e4629cacc3bec016 (patch)
treed9dccd46943c3d68595a2fc45f9ca77be776dc67 /src/nix-env/main.cc
parentfe101fa7851c3eccb79441ed7f5805e13934254f (diff)
* `nix-instantiate --{eval|parse}-only --xml': print an XML
  representation instead of an ATerm.
* Indent XML output.

Diffstat (limited to 'src/nix-env/main.cc')
-rw-r--r--src/nix-env/main.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 7ec2667e75..0fb115533f 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -804,7 +804,7 @@ static void opQuery(Globals & globals,
     /* Print the desired columns, or XML output. */
     Table table;
     ostringstream dummy;
-    XMLWriter xml(*(xmlOutput ? &cout : &dummy));
+    XMLWriter xml(true, *(xmlOutput ? &cout : &dummy));
     XMLOpenElement xmlRoot(xml, "items");
     
     for (vector<DrvInfo>::iterator i = elems2.begin();
@@ -903,10 +903,9 @@ static void opQuery(Globals & globals,
                     columns.push_back(descr);
             }
 
-            if (xmlOutput) {
+            if (xmlOutput)
                 xml.writeEmptyElement("item", attrs);
-                xml.writeCharData("\n");
-            } else
+            else
                 table.push_back(columns);
 
         } catch (AssertionError & e) {