summaryrefslogtreecommitdiff
path: root/src/xml.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-13 00:10:19 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-13 00:10:19 +0100
commit830d8e01713add5856f44a5246eb65781458d0b8 (patch)
tree736702d96029223cd3403f58bbbd9286dc5680c8 /src/xml.cc
parenta1a33941351365cc371f468c6c9c8f0cf8ca32d2 (diff)
Tweaks for more real-life DCPs; beginning of subtitle support.
Diffstat (limited to 'src/xml.cc')
-rw-r--r--src/xml.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xml.cc b/src/xml.cc
index 72dfe1bb..206cb5f0 100644
--- a/src/xml.cc
+++ b/src/xml.cc
@@ -62,9 +62,14 @@ XMLNode::string_node (string name)
xmlpp::Node* node = xml_node (name);
xmlpp::Node::NodeList c = node->get_children ();
- if (c.size() != 1) {
+
+ if (c.size() > 1) {
throw XMLError ("unexpected content in XML node");
}
+
+ if (c.empty ()) {
+ return "";
+ }
xmlpp::ContentNode const * v = dynamic_cast<xmlpp::ContentNode const *> (c.front());
if (!v) {