@@ -87,7 +87,7 @@ module.exports = class XMLDocumentCB
8787 when NodeType .Comment then @ comment node .value
8888 when NodeType .Element
8989 attributes = {}
90- for own attName, att of node .attributes
90+ for own attName, att of node .attribs
9191 attributes[attName] = att .value
9292 @ node node .name , attributes
9393 when NodeType .Dummy then @ dummy ()
@@ -186,9 +186,9 @@ module.exports = class XMLDocumentCB
186186 else
187187 value = value .apply () if isFunction value
188188 if @options .keepNullAttributes and not value?
189- @currentNode .attributes [name] = new XMLAttribute @ , name, " "
189+ @currentNode .attribs [name] = new XMLAttribute @ , name, " "
190190 else if value?
191- @currentNode .attributes [name] = new XMLAttribute @ , name, value
191+ @currentNode .attribs [name] = new XMLAttribute @ , name, value
192192
193193 return @
194194
@@ -425,7 +425,7 @@ module.exports = class XMLDocumentCB
425425 chunk = @writer .indent (node, @writerOptions , @currentLevel ) + ' <' + node .name
426426
427427 # attributes
428- for own name, att of node .attributes
428+ for own name, att of node .attribs
429429 chunk += @writer .attribute att, @writerOptions , @currentLevel
430430
431431 chunk += (if node .children then ' >' else ' />' ) + @writer .endline (node, @writerOptions , @currentLevel )
0 commit comments