MCPcopy Create free account
hub / github.com/TruthHun/BookStack / XMLDocumentCB

Function XMLDocumentCB

static/word2md/mammoth.browser.js:30705–30726  ·  view source on GitHub ↗
(options, onData, onEnd)

Source from the content-addressed store, hash-verified

30703
30704 module.exports = XMLDocumentCB = (function() {
30705 function XMLDocumentCB(options, onData, onEnd) {
30706 var writerOptions;
30707 this.name = "?xml";
30708 options || (options = {});
30709 if (!options.writer) {
30710 options.writer = new XMLStringWriter(options);
30711 } else if (isPlainObject(options.writer)) {
30712 writerOptions = options.writer;
30713 options.writer = new XMLStringWriter(writerOptions);
30714 }
30715 this.options = options;
30716 this.writer = options.writer;
30717 this.stringify = new XMLStringifier(options);
30718 this.onDataCallback = onData || function() {};
30719 this.onEndCallback = onEnd || function() {};
30720 this.currentNode = null;
30721 this.currentLevel = -1;
30722 this.openTags = {};
30723 this.documentStarted = false;
30724 this.documentCompleted = false;
30725 this.root = null;
30726 }
30727
30728 XMLDocumentCB.prototype.node = function(name, attributes, text) {
30729 var ref1;

Callers

nothing calls this directly

Calls 1

isPlainObjectFunction · 0.50

Tested by

no test coverage detected