UNPKG

@smarttracker/blue-button-generate

Version:
24 lines (18 loc) 455 B
"use strict"; var libxmljs = require("libxmljs"); exports.newDocument = function () { return new libxmljs.Document(); }; exports.newNode = function (xmlDoc, name, text) { if ((text === undefined) || (text === null)) { return xmlDoc.node(name); } else { return xmlDoc.node(name, text); } }; exports.nodeAttr = function (node, attr) { node.attr(attr); }; exports.serializeToString = function (xmlDoc) { return xmlDoc.toString(); };