title: XSD - Max Children?
body: <p>Trying to work this out, any help would be appreciated.</p>
  
  <p>I have an xml file laid out as follows : </p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt; 
  &lt;test&gt;
  &lt;Name&gt;Folder exists check&lt;/Name&gt;
  &lt;type&gt;
      &lt;DoesFolderExist&gt;
          Synchronisation Errors
      &lt;/DoesFolderExist&gt;
  &lt;/type&gt;
  &lt;/test&gt;
  </code></pre>
  
  <p>For the <code>&lt;type&gt;</code> section, I would like my xsd to be only able to have ONE child, but the actual type may vary, it may not necessarily be "DoesFolderExist" - it could be "FolderCount", or whatever. Basically, it can only have one child, but that child may be one of any predefined type that my users can choose from. Can I get a simple example here of how I might lay that out in my xsd?</p>
  
  <p>Here is what I currently have, and I am not to sure about where to go from here : </p>
  
  <pre><code>       string XSDMarkup = 
          @"xsd:schema xmlns:xsd='http://www.ws.org/2001/XMLSchema'&gt;
              &lt;xsd:element name='tests'&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element name='test' minOccurs='1'/&gt;
                      &lt;xsd:element name='type' minOccurs='1' maxOccurs='1'&gt;
                          &lt;xsd:sequence&gt;
                              &lt;xsd:element
          "; 
  </code></pre>
  
  <p>I know the xsd above is incomplete and will not work, but I am obviously not finished yet.</p>
  
  <p>Thanks again</p>