Hello,

Am I doing something wrong or is it a bug?
What I’m trying to do is this:
I create a dataset. Load a schema, read my XML and bind the dataset to a datagridview.

Not too complicated, but the thing is that the XML is not validated the way I want it to be validated.

What I want is an XML file with exactly 18 digits. The schema looks like this:
[CODE]

http://www.w3.org/2001/XMLSchema">
 
   
     
       
         
           
             
               
                 
                   
                   
                   
                   
                 

               

             

           

         

       

     

   

 


[/CODE]

The XML file looks like this. I adapted the XML data a little to force a validation error, but it doesn’t seem like it is validating at all except when I put in a 19 digit string.
[CODE]


 
    123456789012345678
 

 
    12345678901234567
 

 
    12345678901234567A
 

 
    123456789012345678
 


[/CODE]


The code for loading the schema and the XML is pretty basic:
[CODE]
xmlDS = new DataSet();

xmlDS.ReadXmlSchema(@”EAN.XSD”);
xmlDS.ReadXml(@”EAN.XML”);

this.dataGridView1.DataSource = xmlDS.Tables["MEASUREMENT"];
[/CODE]

Does anyone have a clue?