Hi Jens,
What you're looking for is not trivial but not impossible either.

You can write a Groovy script that gradually creates an XML document out of an XSD file and uses
SampleXmlUtil support class to create a sample for the desired element that is defined in your Xml Schema.
Here's how it would look like:
import org.apache.xmlbeans.*
import javax.xml.namespace.*
// provide file path to XSD file
def xsdObject = XmlObject.Factory.parse(new File(xsdFilename))
def xmlBeans = new XmlBeans()
def loader = xmlBeans.loadXsd( xsdObject )
namespace = 'urn:yahoo:api' // replace
elementName = 'Error' // replace
def qName = new QName(namespace, elementName)
def el = loader.findElement(qName)
if (el != null) {
log.info("Created an element with qualified name: " + qName)
def xml = SampleXmlUtil.createSampleForElement( el )
log.info("xml document: " + xml)
} else {
log.warn("Could not create a non-existing element with qualified name: " + qName);
}
I hope this will push you in the right direction.
Cheers!
/Nenad Nikolic a.k.a. Shonzilla