Along the lines of my work in the Word-Moodle-Quiz project, I was attempting to create an XSD (XML Schema Definition) file for validating the XML generated by the customized Word document. Currently, the only way to validate XML is to try to import it into Moodle and see if there are any errors. That process is far from agile.
After spending several hours with various XML tools (Visual Studio 2013, several online XML to XSD generators), the XML format used by Moodle Quizzes is not suited for detailed validation with XSD.
The reason for this is that the <question> tag is overloaded. For example, <question> is used as a "dummy" holder for Bank Category information in one instance (e.g., <question type="category">), and each of the "real" question types can be very different (e.g., <question type="multichoice"> vs <question type="shortanswer">). XSD requires that "elements with the same name have the same type" (note that "type" in this case is the structure of the XML that is nested in the element).
See this answer in Stackoverflow for more details. Someone was trying to do exactly the same thing as I was.
I think what this is telling me is that to support a valid XSD schema, the Moodle XML format would have to be changed. All the overloaded <question> tags would have to be different, e.g., <category>, <multichoicequestion>, <shortanswerquestion>, etc.
Sorry for this tech-heavy posting. I figure it's useful to share the information here in case anyone else ever tries to do the same, or -- even better -- in case someone comes to a different conclusion than mine (that is more positive regarding the XML format).
I attached the XSD file that I was working on, if anyone is curious. It's incomplete but valid, but will become invalid as soon as one tries to support more than the first "dummy" question (for Bank category specification). That part is commented out near the bottom.
Please ping me at my email address in my profile if you want me to see a reply right away. I can't subscribe to forum-level email on Moodle.org (still waiting for thread-level subscriptions to work).