I am getting this error when validating an xml file with an xsd.
pom.xml is not valid because cvc-elt.1: Cannot find the declaration of element 'project'.
The xml file actually contains the 'project' tag. I am wondering still why this error happens!!!.
Actually I am programmatically validates a supplied xml with the schema.
This xml itself contains reference to a schema 'maven-v4_0_0.xsd'.
See the start tag of the xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Is it like that if my xml file contains reference to another schema, the programmatic comparison with the supplied schema will not take place?
Please note that I should not delete the schema which is refernced in the xml file.
Please give me a solution for this..