My task is to create a gui which will allow the user to select a xsd file and then create an xml file which will be successfully validated by the selected xsd file.
To do this, I need to be able to find out what the legal values of a selected element are and what are the legal child elements it can have etc. (And a whole load of other stuff as well...)
You can feed your XML and XSD to the exisiting validating parsers likes Xerces, Sun MSV and let them do the job of checking the element hierarchy, values etc.,