From b405b414993458babbb4532ddeeef9928ec7c06e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 Sep 2013 13:48:46 +0100 Subject: Add as_xml to string to KDM. --- src/kdm.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/kdm.cc') diff --git a/src/kdm.cc b/src/kdm.cc index ac83e790..8f244500 100644 --- a/src/kdm.cc +++ b/src/kdm.cc @@ -154,6 +154,13 @@ KDM::as_xml (boost::filesystem::path path) const doc->write_to_file_formatted (path.string(), "UTF-8"); } +string +KDM::as_xml () const +{ + shared_ptr doc = xml_kdm->as_xml (); + return doc->write_to_string_formatted ("UTF-8"); +} + KDMKey::KDMKey (shared_ptr signer, string cpl_id, string key_id, boost::posix_time::ptime from, boost::posix_time::ptime until, Key key) : _cpl_id (cpl_id) , _key_id (key_id) -- cgit v1.2.3