I am working on a project in C# that will get a recordset returned from SqlServer and I need to write out a file in XML using a XmlWriter. My problem is trying to figure out how to write the Xml file to match the schema. Ive looked the web over & this seems to be an unusual thing to do.Can anyone give me some ideas on doing this. Ive just started learning XML and I think I have a decent understanding on getting the writer to work, but this problem of matching the schema is throwing me.