title: can't open xml file on android
body: <p>I am working on an android application in which I want to parse an xml file as a local resource. I use jdom to parse it, but I have a probleme, I can not open the file and I don't know why. The error is at this line :</p>
  
  <pre><code>document = builder.build(new File("res/xml/data.xml"));
  </code></pre>
  
  <p>The file is located into the folder res/xml of my project. I got this error:</p>
  
  <pre><code>java.io.IOException: Couldn't open file:/res/xml/data.xml
  Caused by java.io.FileNotFoundException :res/xml/data.xml
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>document = builder.build(new File("data.xml"));
  </code></pre>
  
  <p>but it did not work. I don't know why the file is not found.</p>
  
  <p>Would you have an idea?</p>
  
  <p>Thanks in advance</p>
  
  <hr>
  
  <p>Thank you for your suggestion. The 'Uri path' works but not the line </p>
  
  <pre><code>document = builder.build(new File(path));
  </code></pre>
  
  <p>The method class File must have a type entree String. I tried this:</p>
  
  <pre><code>document = builder.build(new File(path.getPath());
  </code></pre>
  
  <p>but it returned null and </p>
  
  <pre><code>document = builder.build(new File(path.toString());
  </code></pre>
  
  <p>I got the same error. Would you have an idea ?
  Thanks in advance !!</p>