Skip to content

Commit

Permalink
Merge pull request #13 from bargru/master
Browse files Browse the repository at this point in the history
convert windows string filepaths to java compatible string filepaths
  • Loading branch information
lcduarte authored Oct 1, 2019
2 parents 778c9a5 + 8474d28 commit 22b0310
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/xmlet/xsdparser/core/XsdParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ private void parseFile(String filePath) {
filePath = parentFile.substring(0, parentFile.lastIndexOf('/') + 1).concat(filePath);

if (!new File(filePath).exists()) {
throw new FileNotFoundException();
throw new FileNotFoundException(filePath);
}
} else {
throw new FileNotFoundException();
throw new FileNotFoundException(filePath);
}
}

this.currentFile = filePath;
this.currentFile = filePath.replace("\\", "/");

XsdSchema.parse(this, getSchemaNode(filePath));
} catch (SAXException | IOException | ParserConfigurationException e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/xmlet/xsdparser/core/XsdParserJar.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private void parse(String jarPath, String filePath){
*/
private void parseJarFile(String filePath) {
//https://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
this.currentFile = filePath;
this.currentFile = filePath.replace("\\", "/");
InputStream inputStream = classLoader.getResourceAsStream(filePath);

try {
Expand Down

0 comments on commit 22b0310

Please sign in to comment.