From a38ed141c1f33ecdad99b322acb1ae07b30a5da2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 18 May 2012 01:31:01 -0600 Subject: Switched to Boost.PropertyTree for XML generation --- src/utils.h | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index 34011e3f..7f5242d9 100644 --- a/src/utils.h +++ b/src/utils.h @@ -727,51 +727,6 @@ inline string sha1sum(const string& str) return to_hex(message_digest, 5); } -class push_xml -{ - std::ostream& out; - string tag; - bool leave_open; - -public: - push_xml(std::ostream& _out, const string& _tag, bool has_attrs = false, - bool _leave_open = false) - : out(_out), tag(_tag), leave_open(_leave_open) { - out << '<' << tag; - if (! has_attrs) - out << '>'; - } - ~push_xml() { - if (! leave_open) - out << "'; - } - - void close_attrs() { - out << '>'; - } - - static string guard(const string& str) { - std::ostringstream buf; - foreach (const char& ch, str) { - switch (ch) { - case '<': - buf << "<"; - break; - case '>': - buf << ">"; - break; - case '&': - buf << "&"; - break; - default: - buf << ch; - break; - } - } - return buf.str(); - } -}; - extern const string version; } // namespace ledger -- cgit v1.2.3