title: XSD to XML conversion not contain all the fields
body: <p>I have a XSD file and when i try to conver this file using following code</p>
  
  <pre><code>   public XmlDocument GetXml(XmlDocument xsd, XmlQualifiedName rootElem)
        {
          var reader = XmlReader.Create(new StringReader(xsd.OuterXml),new XmlReaderSettings
          {
              DtdProcessing = DtdProcessing.Prohibit
          });
  
          XmlSchema schema = XmlSchema.Read(reader, null);
          var generator = new XmlSampleGenerator(schema, rootElem);
          generator.MaxThreshold = 1;
  
          var xmlStringBuilder = new StringBuilder();
          var writer = XmlWriter.Create(xmlStringBuilder);
          generator.WriteXml(writer);
  
          var resultXmlDoc = new XmlDocument();
          resultXmlDoc.LoadXml(xmlStringBuilder.ToString());
          BlankOutValues(resultXmlDoc.DocumentElement);
          return resultXmlDoc;
      }
  </code></pre>
  
  <p>under the applicant i am setting a node employeetype like</p>
  
  <p>
  but while converting all the field which is not contain all the values</p>
  
  <p>while converting this with online tool it is working fine any idea?</p>
  
  <p><a href="https://i.stack.imgur.com/E33YO.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>under the node Time At Employer we have 2 fields but in other end it looks like an attribute!</p>