00001
00002 (function() {
00003 var XMLNode, XMLRaw,
00004 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; },
00005 hasProp = {}.hasOwnProperty;
00006
00007 XMLNode = require('./XMLNode');
00008
00009 module.exports = XMLRaw = (function(superClass) {
00010 extend(XMLRaw, superClass);
00011
00012 function XMLRaw(parent, text) {
00013 XMLRaw.__super__.constructor.call(this, parent);
00014 if (text == null) {
00015 throw new Error("Missing raw text");
00016 }
00017 this.value = this.stringify.raw(text);
00018 }
00019
00020 XMLRaw.prototype.clone = function() {
00021 return Object.create(this);
00022 };
00023
00024 XMLRaw.prototype.toString = function(options) {
00025 return this.options.writer.set(options).raw(this);
00026 };
00027
00028 return XMLRaw;
00029
00030 })(XMLNode);
00031
00032 }).call(this);