I'm using XDocument and LINQ to parse some XML files, and some worked fine, but others did not. Looking into it, I found the difference:
Files that work look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Scenario>
...
</Scenario>
</Scenarios>
Files that don't look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Scenarios xmlns="http://www.w3.org/2001/XMLSchema-instance">
<Scenario>
...
</Scenario>
</Scenarios>
If you don't see it, the missing element is the :xsi alias in the root element.
I just want to know why this is the case. Files that are otherwise the same won't be parsed by XDocument.Load() unless they have that alias.
Thanks in advance!
xsi:prefixed in the XML that doesn't work?