I had a problem checking my XML file after it was automatically formatted. Validation does not cut the string before validation. Is this a bug in the implementation of XML.NET validation, or is this an accepted behavior? If the behavior is accepted, such cases are usually handled, since, in my opinion, both 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 (passing validation):
... <ItemType>ItemA</ItemType> ...
After formatting (verification fails):
... <ItemType> ItemA </ItemType> ...
source share