attr_keys.sort() # TODO this should be "lexicographically by UTF-16 code unit"
for k in attr_keys
ret += "#{prefix} #{k}=\"#{el.attrs[k]}\"\n"
attr_keys.sort() # TODO this should be "lexicographically by UTF-16 code unit"
for k in attr_keys
ret += "#{prefix} #{k}=\"#{el.attrs[k]}\"\n"
ret += "#{prefix} content\n"
ret += serialize_els el.children, "#{prefix} "
else
ret += "#{prefix} content\n"
ret += serialize_els el.children, "#{prefix} "
else