<p>Are there any Code Generators that would take a well-formed XML document, and write out an XSD schema based on how the XML document is structured?</p>

The XSD.exe utility (which is installed with Visual Studio) is capable of creating an XSD file from an XML file.
Here's the link on
MSDN
I believe it may also part of the .NET SDK, meaning you would not need a full-blown Visual Studio installation.