I am having trouble learning the purpose of XSD documents, and would like either an explanation, or a link to a decent resource. I've been reading various websites for a couple hours and haven't found anything that explains the "big picture."
Specifically, I'd like to know:
- When do you need an XSD? Why would you use one?
- What advantages does an XSD offer? What are the alternatives?
From what I understand so far, you basically describe a class structure in an XML format. But what do you do with it at that point? Is it used in during the compilation? Is it used so that you can save class instances in an XML document more easily?
I'm having trouble seeing why you would need to describe a class in an XML file, when you could just use the code file. My first thought was that somehow the XSD gets loaded at runtime, and would allow users to modify it on the fly, but that doesn't really make sense because if an object is added, there is no way to reference it in the rest of the code.
Also, is it possible to describe functions in an XSD/XML document?
Thanks ahead of time.