| // Generated by CoffeeScript 1.12.7 | |
| (function() { | |
| var XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; | |
| ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction; | |
| XMLDocument = require('./XMLDocument'); | |
| XMLDocumentCB = require('./XMLDocumentCB'); | |
| XMLStringWriter = require('./XMLStringWriter'); | |
| XMLStreamWriter = require('./XMLStreamWriter'); | |
| module.exports.create = function(name, xmldec, doctype, options) { | |
| var doc, root; | |
| if (name == null) { | |
| throw new Error("Root element needs a name."); | |
| } | |
| options = assign({}, xmldec, doctype, options); | |
| doc = new XMLDocument(options); | |
| root = doc.element(name); | |
| if (!options.headless) { | |
| doc.declaration(options); | |
| if ((options.pubID != null) || (options.sysID != null)) { | |
| doc.doctype(options); | |
| } | |
| } | |
| return root; | |
| }; | |
| module.exports.begin = function(options, onData, onEnd) { | |
| var ref1; | |
| if (isFunction(options)) { | |
| ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; | |
| options = {}; | |
| } | |
| if (onData) { | |
| return new XMLDocumentCB(options, onData, onEnd); | |
| } else { | |
| return new XMLDocument(options); | |
| } | |
| }; | |
| module.exports.stringWriter = function(options) { | |
| return new XMLStringWriter(options); | |
| }; | |
| module.exports.streamWriter = function(stream, options) { | |
| return new XMLStreamWriter(stream, options); | |
| }; | |
| }).call(this); | |
Xet Storage Details
- Size:
- 1.46 kB
- Xet hash:
- 0be4ec601cf240b03630d61db5839a0d946447cbe823ef5be6c2ef9279a380b8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.