I often create a bunch of little XML files for any number of uses. Often, these files are thrown together quickly for a specific purpose, and I don’t do any formal definition of the structure. It’s usually easier for me to bash out an XML file without worrying too much about a schema.
But, recently, I needed to produce an XSD of a XML file format. This page had some useful suggestions. Trang was the first tool on their list that I tried, and it seemed to work quite well for my purposes. Point it at a sample XML file, and — voila! — instant XSD. Obviously, it’s not psychic — it can’t tell everything about what I intend, but the resulting XSD was surprisingly thorough.