views:

228

answers:

1

I have a fairly complex XML coming my way and I have the XSD for it. I generated classes via xsd.exe and read XML into the class structure via the XmlSerializer described here.

It works great. However, this is the first time I've done it this way and I'll be reading in tons of XML files going forward from various sources. How reliable is this method? Could one say with certainty that if the XML file conforms to the XSD specification, that the XmlSerializer will be able to read it in just fine?

+1  A: 

Short answer: it better. This is exactly how MSfts web services work, so if what you described didn't work, any of the .NET consumers would fail, like when you add a reference to a web service in .NET or Silverlight.

jvenema