Here is my solution that really works with XMLParserv2, I hope this helps:
protected URL createURL(String filename){
URL url = null;
try {
url = new URL("file://" + System.getProperty("user.dir") + File.separator + filename);
} catch (MalformedURLException e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
return url;
}
source
share