title: Validate an XML file against local DTD file with Java
body: <p>How can I validate an XML file against a DTD that is stored locally as a file? The XML file does not have any DOCTYPE declaration (or may have one that should then be overridden). I had a look at <a href="https://stackoverflow.com/questions/470313/net-how-to-validate-xml-file-with-dtd-without-doctype-declaration">this thread</a> but besides the fact they are using .NET I doubt that this is a good solution.</p>
  
  <p>Any input appreciated!</p>