I am trying to validate the XML with the schema in C#. I will be having an unknown elements under the row element. I am using xs:any
, I am getting the below error
The element 'row' has invalid child element 'Name'.
Schema -
<xs:element name="table">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="row">
<xs:complexType>
<xs:sequence>
<xs:any processContents="lax"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
XML -
<table>
<row>
<ProductID>994</ProductID>
<Name>LL Bottom Bracket</Name>
<ProductModel>LL Bottom Bracket</ProductModel>
<CultureID>en </CultureID>
<Description>Chromoly steel.</Description>
</row>
</table>