I have a problem with validating my XML file, after it has been automatically formatted. The validation doesn't trim the string before validating it. Is this a bug in the implementation of the XML validation of .NET or is this accepted behavior? If it is accepted behavior, how are cases like this normally handled, because in my opinion, the two XML files are equivalent.
My XSD:
<xs:schema ...>
...
<xs:simpleType name="ItemTypeData">
<xs:restriction base="xs:string">
<xs:enumeration value="ItemA" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
My XML before formatting (validation passes):
...
<ItemType>ItemA</ItemType>
...
After formatting (validation fails):
...
<ItemType>
ItemA
</ItemType>
...