allow parsing a single scalar value (plain text)
directly at the root, without any sequences or maps
--- a/src/XMLDocumentConstructor.h Wed Oct 28 00:05:29 2020 +0100
+++ b/src/XMLDocumentConstructor.h Wed Oct 28 16:30:01 2020 +0100
@@ -121,6 +121,8 @@
current->add_child_text(y2x(event.data.scalar.value));
current = parentOrSelf(current);
mode.pop_back();
+ } else if (mode.back() == Mode::ROOT) {
+ current->add_child_text(y2x(event.data.scalar.value));
} else {
std::cerr << "YAML_SCALAR_EVENT: ???" << std::endl;
}