title: XMLReader searches for DTD files relatively to main app instead of XML file
body: <p>I'm trying to run some XML parsings using Netbeans as the IDE.
  My project is in <code>F:\Project</code> and my XML is in <code>D:\XML\data.xml</code> along with <code>D:\XML\validation.dtd</code>.
  The dtd file is referred in my XML as followed:</p>
  
  <p><code>&lt;!DOCTYPE softwarelist SYSTEM "validation.dtd"&gt;</code></p>
  
  <p>But I don't understand why the XMLReader is searching for the dtd relatively to the project folder instead of the XML folder?</p>
  
  <p>Here's the parsing code:</p>
  
  <pre><code>    try {
          SAXParserFactory spf = SAXParserFactory.newInstance();
          spf.setNamespaceAware(false);
          XMLReader xmlReader = spf.newSAXParser().getXMLReader();
  
          xmlReader.parse(new InputSource(Files.newInputStream(path)));
      } catch (ParserConfigurationException | SAXException | IOException ex) {
          Logger.getLogger(SoftwareListLoader.class.getName()).log(Level.SEVERE, null, ex);
      }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>java.io.FileNotFoundException: F:\Project\softwarelist.dtd (Specified file not found)</p>
  </blockquote>
  
  <p>Is there a way to tell the parser to find the dtd relatively to the XML document file?</p>