title: xml validity with xsd with xsi:nillable element
body: <p>My XML file </p>
  
  <pre><code>    &lt;tns:SampleInfoResponse xsi:schemaLocation="sampleNS test.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="sampleNS"&gt;
   &lt;tns:SampleInfo&gt;
    &lt;tns:firstName&gt;String&lt;/tns:firstName&gt;
    &lt;tns:lastName&gt;String&lt;/tns:lastName&gt;
    &lt;tns:lbn&gt;String&lt;/tns:lbn&gt;
    &lt;tns:LSampleDetails&gt;
     &lt;tns:SampleState&gt;String&lt;/tns:SampleState&gt;
     &lt;tns:SampleId&gt;String&lt;/tns:SampleId&gt;
     &lt;tns:sample&gt;String&lt;/tns:sample&gt;
     &lt;tns:status&gt;String&lt;/tns:status&gt;
     &lt;tns:statusDate&gt;String&lt;/tns:statusDate&gt;
     &lt;tns:SampleId&gt;String&lt;/tns:SampleId&gt;
    &lt;/tns:LSampleDetails&gt;
    **&lt;tns:LSampleEnrlDetails/&gt;**
    &lt;tns:middleName&gt;String&lt;/tns:middleName&gt;
    &lt;tns:element1&gt;String&lt;/tns:element1&gt;
    &lt;tns:element2&gt;String&lt;/tns:element2&gt;
   &lt;/tns:SampleInfo&gt;
  &lt;/tns:SampleInfoResponse&gt;
  </code></pre>
  
  <p>MY XSD file</p>
  
  <pre><code>    &lt;xsd:schema targetNamespace="sampleNS" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="sampleNS" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;xsd:element name="SampleInfoResponse" type="tns:SampleInfoResponseV1"/&gt;
   &lt;xsd:complexType name="SampleInfoResponseV1"&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element name="SampleInfo" type="tns:SampleInfVO" minOccurs="0" maxOccurs="unbounded"/&gt;
    &lt;/xsd:sequence&gt;
   &lt;/xsd:complexType&gt;
   &lt;xsd:complexType name="SampleInfVO"&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element name="firstName" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="lastName" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="lbn" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="LSampleDetails" type="tns:SampleDetailsVO" nillable="true" maxOccurs="unbounded"/&gt;
     &lt;xsd:element name="LSampleEnrlDetails" type="tns:SampleEnrlDetailsVO" nillable="true" maxOccurs="unbounded"/&gt;
     &lt;xsd:element name="middleName" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="element1" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="element2" type="xsd:string" nillable="true"/&gt;
    &lt;/xsd:sequence&gt;
   &lt;/xsd:complexType&gt;
   &lt;xsd:complexType name="SampleDetailsVO"&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element name="SampleState" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="SampleId" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="sample" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="status" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="statusDate" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="SampleId" type="xsd:string" nillable="true"/&gt;
    &lt;/xsd:sequence&gt;
   &lt;/xsd:complexType&gt;
   &lt;xsd:complexType name="SampleEnrlDetailsVO"&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element name="element1" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="element2" type="xsd:string" nillable="true"/&gt;
     &lt;xsd:element name="element3" type="xsd:boolean"/&gt;
    &lt;/xsd:sequence&gt;
   &lt;/xsd:complexType&gt;
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>parser is complaining on <code>&lt;tns:LSampleEnrlDetails/&gt;</code>, the XML file should be <code>&lt;tns:LSampleEnrlDetails xsi:nil="true"/&gt;</code> only for valid file ? By taking out the whole tag 
  also the parser is complaining. </p>
  
  <p>I would like to know what possible cases for this tag <code>&lt;tns:LSampleEnrlDetails/&gt;</code> makes 
  the XML file valid according the above schema when i don't have the data to populate for tag <code>&lt;tns:LSampleEnrlDetails/&gt;</code></p>