I have a XML file and XSD for it. In this form it works fine:
<tns:Users xmlns:tns="http://www.example.org/NewXMLSchema">
<User>
<FirstName>Max</FirstName>
<LastName>Gordon</LastName>
<Salary>80000</Salary>
</User>
<User>
<FirstName>Alex</FirstName>
<LastName>Disel</LastName>
<Salary>75000</Salary>
</User>
</tns:Users>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/NewXMLSchema"
xmlns:tns="http://www.example.org/NewXMLSchema">
<element name="Users">
<complexType>
<sequence maxOccurs="unbounded" minOccurs="1">
<element name="User">
<complexType>
<sequence>
<element name="FirstName" type="string"/>
<element name="LastName" type="string"/>
<element name="Salary" type="int"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
I wonder why it doesn't in another: if I omitted tns prefixes in xml file? I mean it would became a default namespace then:
<Users xmlns="http://www.example.org/NewXMLSchema">
<User>
<FirstName>Max</FirstName>
<LastName>Gordon</LastName>
<Salary>80000</Salary>
</User>
<User>
<FirstName>Alex</FirstName>
<LastName>Disel</LastName>
<Salary>75000</Salary>
</User>
</Users>