Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

xsd element maxOccurs ignored by readXMLSchema

$
0
0

Hello,

I have the following issue: when I load xsd definition into a dataset (ds.readXMLSchema) it seems to ignore maxOccurs parameter for userdefined datatypes.

when parsing this data
<EmployeeCode>0841</EmployeeCode>
<EmployeeCode>0842</EmployeeCode>

with this declaration
<xs:element minOccurs="0" maxOccurs="unbounded" name="EmployeeCode" type="xs:string">

it is parsed fine: separate table is created and both values are there.

BUT with this declaration
<xs:element minOccurs="0" maxOccurs="unbounded" name="EmployeeCode" type="mydefenition:string_max_8">
where
 <xs:simpleType name="string_max_8">
    <xs:restriction base="xs:string">
      <xs:maxLength value="8"/>
    </xs:restriction>
  </xs:simpleType> 

a new column is added to the table representing parent node and populated with the first value


Can someone help, please?


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>