diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-09 03:42:06 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-09 03:42:35 -0500 |
commit | 6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac (patch) | |
tree | 967464fc8bda9543a108d83d3fc96ecdffb4e04c /src/value.cc | |
parent | 2c80227339538154ad0869e746f52db805325589 (diff) | |
download | fork-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.cc | 17 |
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); |