diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-13 15:57:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-13 15:57:00 +0100 |
| commit | 8526058d24faec5f83ffd66758fef8d8c8159f73 (patch) | |
| tree | a43795879b2a434da50ea2f3490aa648d94f667d /src/reel.cc | |
| parent | 7394f50d8b5334a17cac37c8956b1b7e8e5e49c8 (diff) | |
Use libxml++ for writing XML.
Diffstat (limited to 'src/reel.cc')
| -rw-r--r-- | src/reel.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/reel.cc b/src/reel.cc index 86533ea2..481b153b 100644 --- a/src/reel.cc +++ b/src/reel.cc @@ -27,26 +27,23 @@ using namespace std; using namespace libdcp; void -Reel::write_to_cpl (ostream& s) const +Reel::write_to_cpl (xmlpp::Node* node) const { - s << " <Reel>\n" - << " <Id>urn:uuid:" << make_uuid() << "</Id>\n" - << " <AssetList>\n"; + xmlpp::Node* reel = node->add_child ("Reel"); + reel->add_child("Id")->add_child_text ("urn:uuid:" + make_uuid()); + xmlpp::Node* asset_list = reel->add_child ("AssetList"); if (_main_picture) { - _main_picture->write_to_cpl (s); + _main_picture->write_to_cpl (asset_list); } if (_main_sound) { - _main_sound->write_to_cpl (s); + _main_sound->write_to_cpl (asset_list); } if (_main_subtitle) { - _main_subtitle->write_to_cpl (s); + _main_subtitle->write_to_cpl (asset_list); } - - s << " </AssetList>\n" - << " </Reel>\n"; } bool |
