I needed to read an XML file into a dataset and build a web form datagrid from the dataset.
To do this I coded the following:-
myDataSet1.ReadXMLSchema("C:\File1.XSD")
myDataSet1.ReadXML("C:\File1.XML")
myDataGrid1.DataSouce = myDataSet1
myDataGrid1.DataBind
Wors fine BUT it works just as well if I do not load the
schema .XSD file. Is it therefore only appropriate and necessary to load a Schema file when values are added to the dataset and you need to validate the new values fit the rules in the Schema file?
Dazed and confused
To do this I coded the following:-
myDataSet1.ReadXMLSchema("C:\File1.XSD")
myDataSet1.ReadXML("C:\File1.XML")
myDataGrid1.DataSouce = myDataSet1
myDataGrid1.DataBind
Wors fine BUT it works just as well if I do not load the
schema .XSD file. Is it therefore only appropriate and necessary to load a Schema file when values are added to the dataset and you need to validate the new values fit the rules in the Schema file?
Dazed and confused