#include "content_store.h"
#include "spl.h"
#include <libcxml/cxml.h>
+#include <dcp/filesystem.h>
#include <dcp/raw_convert.h>
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
_spl.clear ();
_missing = false;
cxml::Document doc ("SPL");
- doc.read_file (path);
+ doc.read_file(dcp::filesystem::fix_long_path(path));
_id = doc.string_child("Id");
_name = doc.string_child("Name");
for (auto i: doc.node_children("Entry")) {
{
xmlpp::Document doc;
auto root = doc.create_root_node ("SPL");
- root->add_child("Id")->add_child_text (_id);
- root->add_child("Name")->add_child_text (_name);
+ cxml::add_text_child(root, "Id", _id);
+ cxml::add_text_child(root, "Name", _name);
for (auto i: _spl) {
- i.as_xml (root->add_child("Entry"));
+ i.as_xml(cxml::add_child(root, "Entry"));
}
doc.write_to_file_formatted (path.string());
}