xmlbuilder
Advanced tools
Comparing version 0.2.2 to 0.3.0
@@ -15,2 +15,3 @@ (function() { | ||
XMLBuilder.__super__.constructor.call(this, null, '', {}, ''); | ||
this.isDoc = true; | ||
} | ||
@@ -17,0 +18,0 @@ __extends(XMLBuilder, XMLFragment); |
@@ -6,2 +6,3 @@ (function() { | ||
function XMLFragment(parent, name, attributes, text) { | ||
this.isDoc = false; | ||
this.isRoot = false; | ||
@@ -198,2 +199,13 @@ this.parent = parent; | ||
}; | ||
XMLFragment.prototype.document = function() { | ||
var child; | ||
if (this.isDoc) { | ||
return this; | ||
} | ||
child = this.parent; | ||
while (!child.isDoc) { | ||
child = child.parent; | ||
} | ||
return child; | ||
}; | ||
XMLFragment.prototype.prev = function() { | ||
@@ -335,2 +347,5 @@ var i; | ||
}; | ||
XMLFragment.prototype.doc = function() { | ||
return this.document(); | ||
}; | ||
XMLFragment.prototype.e = function(name, attributes, text) { | ||
@@ -337,0 +352,0 @@ return this.element(name, attributes, text); |
{ | ||
"name": "xmlbuilder", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"keywords": "xml xmlbuilder", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/oozcitak/xmlbuilder-js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15365
457