title: Using Java to generate xml from an XSD schema
body: <p>I have a requirement to create a sort of 'skeleton' xml based on an XSD schema.  </p>
  
  <p>The documents defined by these schemas have no namespace. They are authored by other developers, not in an automated way.</p>
  
  <p>There is no mixed content allowed.  That is, elements can contain elements only, or text only.</p>
  
  <p>The rules for this sample xml are:</p>
  
  <ul>
  <li>elements that can contain only text content should not be created in the   sample xml</li>
  <li>all other optional and mandatory elements should be included in the sample xml</li>
  <li>elements should be created only once even if they can occur multiple times</li>
  <li>any other nodes such as attributes, comments, processing instruction, etc. should be ommited - the sample xml would be an 'element tree' </li>
  </ul>
  
  <p>Are there APIs or tools in Java that can generate such sample xml?  I'm looking for pointers where to get started.</p>
  
  <p>This needs to be done programmatically in a reliable way, as the sample xml is used by other XSLT transformations.</p>