Error "cvc-elt.1: Cannot find the declaration of element 'xs:schema'." in Eclipse

478 Views Asked by At

I have the following XML Schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Movies">
      <!-- Other content -->
    </xs:element>
</xs:schema> 

and this XML:

<?xml version="1.0" encoding="UTF-8"?>
<Movies xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mml.xsd">
    <!-- Other content -->
</Movies>

When trying to validate I keep getting the mentioned error in Eclipse

1

There are 1 best solutions below

0
Michael Kay On

Sounds as if you're somehow asking it to validate the schema document rather than the instance document.