I have an XML file that I would like to read (with xml atrributes). The structure does not change, but the contents do.
XML example: http://www.yr.no/place/Norway/Oslo/Oslo/Oslo/forecast.xml
(the URL must be copied and pasted into the address field manually, or you will receive a 404 message).
I cannot make XSD with this code (and using XSD.EXE):
XmlTextReader myXmlTextReader = new XmlTextReader("forecast.xml");
DataSet myDataSet = new DataSet();
myDataSet.ReadXml(myXmlTextReader);
myDataSet.WriteXmlSchema("forecast.xsd");
Results in:
Column name 'name' is defined for different mapping types.
Now imagine that I am lazy on this and don’t want the whole evening to manually map the XML to my objects. I want managed code objects to be created for me, so I can read the data easily.
What are my options?
... - , XSD?