mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 23:41:42 +00:00
Update xml.js
This commit is contained in:
parent
84ae151055
commit
484d6cc500
10
lib/xml.js
10
lib/xml.js
|
@ -16,14 +16,20 @@ var createXMLObject = function() {
|
|||
};
|
||||
|
||||
var loadXMLFile = function(filename) {
|
||||
var doc = createXMLObject();
|
||||
var doc;
|
||||
|
||||
try {
|
||||
doc = createXMLObject();
|
||||
|
||||
if (FILE.fileExists(filename)) {
|
||||
doc.loadXML(FILE.readFile(filename, "utf-8"));
|
||||
} else {
|
||||
console.log("The file does not exists");
|
||||
console.error("The file does not exists");
|
||||
return;
|
||||
}
|
||||
} catch(e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
|
||||
return {
|
||||
select: function(path) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user