src/XMLDocumentConstructor.h
branchv_0
changeset 19 aabdab3e05a0
parent 18 737c507a3e32
child 21 053054f9f702
--- 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;
 				}