Hello,
I have an issue that I when I I use ReadXml() on my strongly typed dataset, that it does not throw and exception when the xml file is not compliant with the valid schema. It just ignores the fact the file is not valid and loads no data silently. I was looking at how to validate xml documents and the simplest way seems to be using an xml schema, hence why I would like to generate the valid xml schema from my dataset and not it have to write it myself.
I found plenty of examples of how to generate a dataset from an xml schema, but not the other way around. It could just be that I am approaching this wrong, but it is important that I know the file is valid before I load it, as data could be lost otherwise. The end user can select any xml file, hence why the validation is needed.
Any help would be appreciated.
Guy