by default the xml variable supports a content structure of xml this is very useful if you are constructing an xml blob. It works for typed and untyped code, and it has it’s place.
The following code shows an xml query that would work if the data passed the schema checks.
Though the following query manadates the need for a single root node and would fail.
in the case where you are processing data and you have the data laid out in a schema you might want to constrain the incoming information to a single document. If two xml blobs are passed in to be processed but both blobs meet the schema criteria your dataload may fail. or worse it could pass correctly, without warning you of issues.
The code below would pass as it fulfils the schema matching requirement and also has a single root node.
A very simple solution to what could be a awkward fix after the fact.