switched code to use nicer iteration over Map

This commit is contained in:
James Strachan
2012-04-12 15:04:30 +01:00
parent 57a5e81db8
commit 5802a6f0ba
4 changed files with 17 additions and 24 deletions
@@ -44,10 +44,8 @@ abstract class Tag(val name : String) : Element() {
builder.append("<")
builder.append(name)
if (!attributes.isEmpty()) {
for (e in attributes.entrySet()) {
if (e != null) {
builder.append(" ${e.getKey()}=\"${e.getValue()}\"")
}
for (e in attributes) {
builder.append(" ${e.key}=\"${e.value}\"")
}
}
if (children.isEmpty()) {