Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Varkel committed May 22, 2015
1 parent 89a99b1 commit bf704ce
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/xml-writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function strval(s) {
}
else if (typeof s == 'function') {
return s();
}
}
else if (s instanceof XMLWriter) {
return s.toString();
}
Expand Down Expand Up @@ -82,7 +82,7 @@ XMLWriter.prototype = {

startDocument : function (version, encoding, standalone) {
if (this.tags || this.attributes) return this;

this.startPI('xml');
this.startAttribute('version');
this.text(typeof version == "string" ? version : "1.0");
Expand All @@ -91,7 +91,7 @@ XMLWriter.prototype = {
this.startAttribute('encoding');
this.text(encoding);
this.endAttribute();
writer_encoding = encoding;
this.writer_encoding = encoding;
}
if (standalone) {
this.startAttribute('standalone');
Expand Down Expand Up @@ -130,7 +130,7 @@ XMLWriter.prototype = {
this.texts = 0;
if (this.stack.length > 0)
this.stack[this.stack.length-1].containsTag = true;

this.stack.push({
name: name,
tags: this.tags
Expand All @@ -152,7 +152,7 @@ XMLWriter.prototype = {
this.texts = 0;
if (this.stack.length > 0)
this.stack[this.stack.length-1].containsTag = true;

this.stack.push({
name: prefix + ':' + name,
tags: this.tags
Expand Down Expand Up @@ -265,7 +265,7 @@ XMLWriter.prototype = {
return this;
} else if (this.attributes && !this.attribute) {
this.endAttributes();
}
}
if (this.comment || this.cdata) {
this.write(content);
}
Expand Down Expand Up @@ -377,7 +377,7 @@ XMLWriter.prototype = {
return this;
},

writeRaw : function(content) {
writeRaw : function(content) {
content = strval(content);
if (!this.tags && !this.comment && !this.pi && !this.cdata) return this;
if (this.attributes && this.attribute) {
Expand Down

0 comments on commit bf704ce

Please sign in to comment.