XML fragment with multiple roots: suppressing VS error
- by Laurent
In Visual Studio, I have an XML file (with .xml extension) which contains an XML fragment that I use in my program:
<tag1>
data
...
</tag1>
<tag2>
data
...
</tag2>
Visual Studio shows me an error in the error list: "XML document cannot contain multiple root level elements".
But this is not a complete document, just a fragment that will be reused. I want to keep my 2 roots in my fragment. How can I get rid of the error message?
Thanks