4 extend =
function(child, parent) {
for (var key in parent) {
if (hasProp.call(parent, key)) child[key] = parent[key]; }
function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype =
new ctor(); child.__super__ = parent.prototype;
return child; },
5 hasProp = {}.hasOwnProperty;
7 XMLNode = require(
'./XMLNode');
9 module.exports = XMLRaw = (
function(superClass) {
10 extend(XMLRaw, superClass);
12 function XMLRaw(parent, text) {
13 XMLRaw.__super__.constructor.call(
this, parent);
15 throw new Error(
"Missing raw text");
17 this.value = this.stringify.raw(text);
20 XMLRaw.prototype.clone =
function() {
21 return Object.create(
this);
24 XMLRaw.prototype.toString =
function(options) {
25 return this.options.writer.set(options).raw(
this);