# HG changeset patch # User František Kučera # Date 1603899001 -3600 # Node ID aabdab3e05a0b0f2475cb7d70cf501f90b97dbb0 # Parent 737c507a3e32fab192081af2057ad2e919414ac5 allow parsing a single scalar value (plain text) directly at the root, without any sequences or maps diff -r 737c507a3e32 -r aabdab3e05a0 src/XMLDocumentConstructor.h --- 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; }