Overview
If you come across XML documents that have no root element, but are otherwise valid (i.e. XML fragments), this article provides one solution for how to use those fragments.Solution
One option is of course to add the root element to the fragments programmatically. For example in C# using the System.Linq.Xml class.If that is not possible, a 'shell' document pulling the fragments can be evaluated.
In the following example, the fragment is named "TestData.xml". TestDataSource.xml can be used for example in an M-Files file source, as it is pulling the fragment inside a root element:
TestDataSource.xml:
<!DOCTYPE root [
<!ENTITY frag SYSTEM "TestData.xml">
]>
<Import>
&frag;
</Import>
