i have a xml file like this:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Prowadzacy xmlns:ns0="http://test.com/xi/prowizja/CODO">
<LIFNR>test</LIFNR>
<NAME>test</NAME>
<SMTP_ADR>test@ds.com</SMTP_ADR>
<CALC_RULE>M</CALC_RULE>
<STATIONS>
<NUMBER>test</NUMBER>
<LOCATION>test</LOCATION>
<KDATB>test</KDATB>
<KDATE/>
</STATIONS>
<STATIONS>
<NUMBER>test</NUMBER>
<LOCATION>test</LOCATION>
<KDATB>test</KDATB>
<KDATE>test</KDATE>
</STATIONS>
</ns0:Prowadzacy>
and xsd like this (I've post only header of xsd):
<xsd:schema targetNamespace="http://orlen.pl/xi/prowizja/CODO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://orlen.pl/xi/prowizja/CODO">
<xsd:complexType name="Prowadzacy">
<xsd:sequence>
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)?
private static XNamespace xn = "http://orlen.pl/xi/prowizja/CODO";
schemaSet.Add(xn.ToString(), XmlReader.Create(new StringReader(xsd)));
can any help me?