code: public void validateXMLString(String xml, String dtdFile, String docType) throws SAXException, IOException, ParserConfigurationException {
      validateInternal(xml, dtdFile, docType);
    }
docs: Validate XML with the given DTD. Throws exception on error.