- self.result += ' ' + self._join(nsData.prefix, node.getAttribute('x-attr-name-'+this));
- self.result += '="'+node.getAttribute('x-attr-value-'+this) +'"';
+ self.result += ' ' + tag;
+ self.result += '="' + value.replace(/&/g, '&').replace(/"/g, '"') + '"';
+ }
+
+ $.each(attributes, function() {
+ writeAttr(
+ this[0], this[1], this[2]
+ );
+ });
+
+ $.each(attributeIDs, function() {
+ writeAttr(
+ node.getAttribute('x-attr-ns-'+this),
+ node.getAttribute('x-attr-name-'+this),
+ node.getAttribute('x-attr-value-'+this)
+ );