(xmlData)
| 49 | } |
| 50 | |
| 51 | const callback = function(xmlData) { |
| 52 | let output = ''; |
| 53 | if (validateOnly) { |
| 54 | output = XMLValidator.validate(xmlData); |
| 55 | process.exitCode = output === true ? 0 : 1; |
| 56 | } else { |
| 57 | const parser = new XMLParser(options); |
| 58 | output = JSON.stringify(parser.parse(xmlData,validate), null, 4); |
| 59 | } |
| 60 | if (outputFileName) { |
| 61 | writeToFile(outputFileName, output); |
| 62 | } else { |
| 63 | console.log(output); |
| 64 | } |
| 65 | }; |
| 66 | |
| 67 | |
| 68 | try { |
no test coverage detected