about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/nix-instantiate/main.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix-instantiate/main.cc b/src/nix-instantiate/main.cc
index f8b0f3a20846..b781e2f2ab7c 100644
--- a/src/nix-instantiate/main.cc
+++ b/src/nix-instantiate/main.cc
@@ -60,8 +60,9 @@ static void printResult(EvalState & state, Expr e,
                 if (matchValidValues(valids, valids2)) {
                     for (ATermIterator j(valids2); j; ++j) {
                         Expr e = evalExpr(state, *j);
-                        XMLOpenElement elem(doc, "value");
-                        doc.writeCharData(showValue(e));
+                        XMLAttrs attrs;
+                        attrs["value"] = showValue(e);
+                        XMLOpenElement elem(doc, "value", attrs);
                     }
                 }
             }