summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-09 03:42:06 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-09 03:42:35 -0500
commit6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac (patch)
tree967464fc8bda9543a108d83d3fc96ecdffb4e04c /src/value.cc
parent2c80227339538154ad0869e746f52db805325589 (diff)
downloadfork-ledger-6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac.tar.gz
fork-ledger-6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac.tar.bz2
fork-ledger-6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac.zip
XML reporting now works via the "xml" command
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/value.cc b/src/value.cc
index 2029b9c5..b4060a1c 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1748,8 +1748,6 @@ bool sort_value_is_less_than(const std::list<sort_value_t>& left_values,
void to_xml(std::ostream& out, const value_t& value)
{
- push_xml x(out, "value");
-
switch (value.type()) {
case value_t::VOID:
out << "<void />";
@@ -1764,6 +1762,14 @@ void to_xml(std::ostream& out, const value_t& value)
out << value.as_long();
break;
}
+
+ case value_t::AMOUNT:
+ to_xml(out, value.as_amount());
+ break;
+ case value_t::BALANCE:
+ to_xml(out, value.as_balance());
+ break;
+
case value_t::DATETIME:
to_xml(out, value.as_datetime());
break;
@@ -1786,13 +1792,6 @@ void to_xml(std::ostream& out, const value_t& value)
break;
}
- case value_t::AMOUNT:
- to_xml(out, value.as_amount());
- break;
- case value_t::BALANCE:
- to_xml(out, value.as_balance());
- break;
-
case value_t::SCOPE:
default:
assert(false);