title: Partial validation of XML using XSD
body: <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;root&gt;
    &lt;employee_name&gt;
      &lt;name&gt;Ram&lt;/name&gt;
      &lt;Prev_name&gt;Kumar&lt;/Prev_name&gt;
    &lt;/employee_name&gt;
    &lt;project ppact="BT"&gt;ODC&lt;/project&gt;
    &lt;team size="small"&gt;CMS&lt;/team&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>XSD:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"&gt;
    &lt;xs:element name="request"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" /&gt;
          &lt;xs:element name="Prev_name" type="xs:string" minOccurs="1" maxOccurs="1" /&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt; 
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>I should validate the presence of 'name' and 'Prev_name' in my XML through XSD. I am not bothered about other tags.Whenever I pass an XML without those two tags or one of it, my XML validation should fail. If my XML has those 2 tags, then only XML validation should pass.</p>