UNPKG

typesxml

Version:

Open source XML library written in TypeScript

42 lines 1.26 kB
"use strict"; /******************************************************************************* * Copyright (c) 2023 - 2024 Maxprograms. * * This program and the accompanying materials * are made available under the terms of the Eclipse License 1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/org/documents/epl-v10.html * * Contributors: * Maxprograms - initial API and implementation *******************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); exports.TextNode = void 0; const Constants_1 = require("./Constants"); const XMLUtils_1 = require("./XMLUtils"); class TextNode { value; constructor(value) { this.value = value; } setValue(value) { this.value = value; } getValue() { return this.value; } getNodeType() { return Constants_1.Constants.TEXT_NODE; } toString() { return XMLUtils_1.XMLUtils.cleanString(this.value); } equals(node) { if (node instanceof TextNode) { return this.value === node.value; } return false; } } exports.TextNode = TextNode; //# sourceMappingURL=TextNode.js.map