summaryrefslogtreecommitdiff
path: root/src/item.cc
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-03-09 12:27:08 -0500
committerCraig Earls <enderw88@gmail.com>2013-03-09 12:27:08 -0500
commitca99c0de03432393aa6576244005c9ad8806fa29 (patch)
treebf0dd4586adb4b7df1adad8a5eff5d2bca36f4e3 /src/item.cc
parent4c608cccd0c6f06f403882dcca36cb62a40178a2 (diff)
parentbfe360d4c992caf2e7da09ab058599c0404f1348 (diff)
downloadfork-ledger-ca99c0de03432393aa6576244005c9ad8806fa29.tar.gz
fork-ledger-ca99c0de03432393aa6576244005c9ad8806fa29.tar.bz2
fork-ledger-ca99c0de03432393aa6576244005c9ad8806fa29.zip
Merge branch 'next' into ledger-mode-automatic-transactions
Diffstat (limited to 'src/item.cc')
-rw-r--r--src/item.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/item.cc b/src/item.cc
index 896589e9..a29a3fd3 100644
--- a/src/item.cc
+++ b/src/item.cc
@@ -600,16 +600,15 @@ string item_context(const item_t& item, const string& desc)
return out.str();
}
-void put_metadata(property_tree::ptree& pt, const item_t::string_map& metadata)
+void put_metadata(property_tree::ptree& st, const item_t::string_map& metadata)
{
- property_tree::ptree& st(pt.put("metadata", ""));
foreach (const item_t::string_map::value_type& pair, metadata) {
if (pair.second.first) {
- property_tree::ptree& vt(st.put("pair", ""));
- vt.put("key", pair.first);
+ property_tree::ptree& vt(st.add("value", ""));
+ vt.put("<xmlattr>.key", pair.first);
put_value(vt, *pair.second.first);
} else {
- st.put("tag", pair.first);
+ st.add("tag", pair.first);
}
}
}