You can use the XML Instance Generator which is part of the Sun Multi-Schema Validator.
It's README.txt states:
Sun XML Generator is a Java tool to generate various XML instances from
several kinds of schemas. It supports DTD, RELAX Namespace, RELAX Core,
TREX, and a subset of W3C XML Schema Part 1. [...]
This is a command-line tool that can generate both valid and invalid
instances from schemas. It can be used for generating test cases for XML
applications that need to conform to a particular schema.
Download and unpack xmlgen.zip
from the msv download page and run the following command to get detailed usage instructions:
java -jar xmlgen.jar -help
Unfortunately, the tool is not free software because it is released under Sun's Binary Code License Agreement.