* Parse XML data buffer to JS object * @param {string|Buffer} xmlData * @param {boolean|Object} validationOption
(xmlData)
| 39 | * @param {boolean|Object} validationOption |
| 40 | */ |
| 41 | parseBytesArr(xmlData) { |
| 42 | if (Array.isArray(xmlData) && xmlData.byteLength !== undefined) { |
| 43 | } else { |
| 44 | throw new Error("XML data is accepted in Bytes[] form.") |
| 45 | } |
| 46 | const parser = new Xml2JsParser(this.options); |
| 47 | parser.entityParser.addExternalEntities(this.externalEntities); |
| 48 | return parser.parseBytesArr(xmlData); |
| 49 | } |
| 50 | /** |
| 51 | * Parse XML data stream to JS object |
| 52 | * @param {fs.ReadableStream} xmlDataStream |
nothing calls this directly
no test coverage detected