Skip to content

Commit 15d97bd

Browse files
author
AndyZe
committed
Additional XML verification for Control nodes
1 parent 2bc72fd commit 15d97bd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/xml_parsing.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,15 @@ void VerifyXML(const std::string& xml_text,
541541
ThrowError(line_number,
542542
std::string("The node <") + name + "> must have 1 or more children");
543543
}
544+
if (name == "ReactiveSequence")
545+
{
546+
const std::string child_name = node->FirstChildElement()->Name();
547+
if (child_name != "Condition" && child_name != "SubTree")
548+
{
549+
ThrowError(line_number,
550+
std::string("The first child of a ReactiveSequence must be of Condition type, not " + child_name));
551+
}
552+
}
544553
}
545554
}
546555
//recursion

0 commit comments

Comments
 (0)