summaryrefslogtreecommitdiff
path: root/src/balance.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/balance.cc')
-rw-r--r--src/balance.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/balance.cc b/src/balance.cc
index 7b1ed4dd..b5c0aed7 100644
--- a/src/balance.cc
+++ b/src/balance.cc
@@ -252,4 +252,14 @@ void balance_t::print(std::ostream& out,
}
}
+void balance_t::write_xml(std::ostream& out, const int depth) const
+{
+ out << xml_str("<balance>\n", depth);
+
+ foreach (const amounts_map::value_type& pair, amounts)
+ pair.second.write_xml(out, depth + 1);
+
+ out << xml_str("</balance>\n", depth);
+}
+
} // namespace ledger