title: how to validate XML using java?
body: <p>I need to parse a bunch of incoming XML documents but it does not contain DOCTYPE (they all have the different DTD). DTD is created by myself. How can I validate an XML file against a DTD that is stored locally as a file? I have following requirement:</p>
  
  <ol>
  <li>All DTDs (for different XML) Will be load into memory once,when incoming XML comes don't looked into an locally stored area.</li>
  <li>validate incoming XML on the basis of load DTD file.</li>
  </ol>
  
  <p>Thanks</p>