|
@@ -54,9 +54,7 @@ const parser = class Parser {
|
|
if (!file.exist(source)) {
|
|
if (!file.exist(source)) {
|
|
throw 'File not found';
|
|
throw 'File not found';
|
|
}
|
|
}
|
|
- let split = source.split('/');
|
|
|
|
- split = split[split.length - 1].split('.');
|
|
|
|
- if (split[split.length - 1] !== 'xml') {
|
|
|
|
|
|
+ if (file.getExtension(source) !== 'xml') {
|
|
throw 'File is not an XML';
|
|
throw 'File is not an XML';
|
|
}
|
|
}
|
|
this.source = source;
|
|
this.source = source;
|