Hi everyone, I'm new to xerces and I'm trying to validate an Html file using w3c's dtds strict.dtd and loose.dtd. My very simple java code is the following: SAXParser parser = new SAXParser(); try { parser.setFeature( "http://xml.org/sax/features/validation", true); parser.parse("new.xml"); } catch (Exception e) { System.out.println("error in setting up parser feature"); } And the Xml file is: Running my example an error occurs: org.xml.sax.SAXParseException: The declaration for the entity "ContentType" must end with '>'. How can I solve this problem? Best regards, Dariush.