MCPcopy Create free account
hub / github.com/NaturalIntelligence/fast-xml-parser / parseStream

Method parseStream

src/v6/XMLParser.js:54–60  ·  view source on GitHub ↗

* Parse XML data stream to JS object * @param {fs.ReadableStream} xmlDataStream

(xmlDataStream)

Source from the content-addressed store, hash-verified

52 * @param {fs.ReadableStream} xmlDataStream
53 */
54 parseStream(xmlDataStream) {
55 if (!isStream(xmlDataStream)) throw new Error("FXP: Invalid stream input");
56
57 const orderedObjParser = new Xml2JsParser(this.options);
58 orderedObjParser.entityParser.addExternalEntities(this.externalEntities);
59 return orderedObjParser.parseStream(xmlDataStream);
60 }
61
62 /**
63 * Add Entity which is not by default supported by this library

Callers

nothing calls this directly

Calls 2

isStreamFunction · 0.85
addExternalEntitiesMethod · 0.45

Tested by

no test coverage detected