Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/sites/node_modules/@aws-sdk/xml-builder/dist-es/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import { __values } from "tslib";
import { escapeAttribute } from "./escape-attribute";
var XmlNode = (function () {
function XmlNode(name, children) {
if (children === void 0) { children = []; }
this.name = name;
this.children = children;
this.attributes = {};
}
XmlNode.prototype.withName = function (name) {
this.name = name;
return this;
};
XmlNode.prototype.addAttribute = function (name, value) {
this.attributes[name] = value;
return this;
};
XmlNode.prototype.addChildNode = function (child) {
this.children.push(child);
return this;
};
XmlNode.prototype.removeAttribute = function (name) {
delete this.attributes[name];
return this;
};
XmlNode.prototype.toString = function () {
var e_1, _a;
var hasChildren = Boolean(this.children.length);
var xmlText = "<".concat(this.name);
var attributes = this.attributes;
try {
for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
var attributeName = _c.value;
var attribute = attributes[attributeName];
if (typeof attribute !== "undefined" && attribute !== null) {
xmlText += " ".concat(attributeName, "=\"").concat(escapeAttribute("" + attribute), "\"");
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return (xmlText += !hasChildren ? "/>" : ">".concat(this.children.map(function (c) { return c.toString(); }).join(""), "</").concat(this.name, ">"));
};
return XmlNode;
}());
export { XmlNode };
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0047 ]-- |