One more C# example with complete code: http://cheeso.members.winisp.net/srcview.aspx?dir=xml-serialization&file=Xsd2xml.cs