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]
[/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]
[/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?
Replies
Know the answer? Post it — somebody with the same question will find it here.