I've seen several different posts about this issue, but none of the suggested solutions have solved my problem, which seems to indicate some fundamental misunderstanding on my behalf. I am under the impression there is a name-spacing issue between my XML and XSD, but I'm not sure how to solve it?
I'm getting the following error whilst validating my XML:
Element
'{http://www.w3.org/2001/XMLSchema}schema'
: No matching global declaration available for the validation root., line 1`
XML:
<?xml version="1.0" encoding="UTF-8"?>
<DOCUMENT_FILE
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="path\to\my.xsd">
<DOCUMENT>
<BRANCH_NUMBER>num</BRANCH_NUMBER>
</DOCUMENT>
</DOCUMENT_FILE>
XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0">
<xsd:element name="DOCUMENT_FILE">
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="DOCUMENT" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="1">
<xsd:element name="BRANCH_NUMBER" minOccurs="1" maxOccurs="1" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>