title: Validate XML with namesaces via XSD c#
body: <p>i have a xml file like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ns0:Prowadzacy xmlns:ns0="http://test.com/xi/prowizja/CODO"&gt;
     &lt;LIFNR&gt;test&lt;/LIFNR&gt;
     &lt;NAME&gt;test&lt;/NAME&gt;
     &lt;SMTP_ADR&gt;test@ds.com&lt;/SMTP_ADR&gt;
     &lt;CALC_RULE&gt;M&lt;/CALC_RULE&gt;
     &lt;STATIONS&gt;
        &lt;NUMBER&gt;test&lt;/NUMBER&gt;
        &lt;LOCATION&gt;test&lt;/LOCATION&gt;
        &lt;KDATB&gt;test&lt;/KDATB&gt;
        &lt;KDATE/&gt;
     &lt;/STATIONS&gt;
     &lt;STATIONS&gt;
        &lt;NUMBER&gt;test&lt;/NUMBER&gt;
        &lt;LOCATION&gt;test&lt;/LOCATION&gt;
        &lt;KDATB&gt;test&lt;/KDATB&gt;
        &lt;KDATE&gt;test&lt;/KDATE&gt;
     &lt;/STATIONS&gt;
  &lt;/ns0:Prowadzacy&gt;
  </code></pre>
  
  <p>and xsd like this (I've post only header of xsd):</p>
  
  <pre><code>&lt;xsd:schema targetNamespace="http://orlen.pl/xi/prowizja/CODO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://orlen.pl/xi/prowizja/CODO"&gt;
      &lt;xsd:complexType name="Prowadzacy"&gt;
          &lt;xsd:sequence&gt;
  </code></pre>
  
  <p>i need to validate XML with this xsd, I was trying to do it like this, and get error about no element "ns0:Prowadzacy", i think i need to remove this attribute (or namespace in validation)? </p>
  
  <pre><code>private static XNamespace xn = "http://orlen.pl/xi/prowizja/CODO";
  schemaSet.Add(xn.ToString(), XmlReader.Create(new StringReader(xsd)));
  </code></pre>
  
  <p>can any help me?</p>