renameProperty

fun Element.renameProperty(oldName: String, newName: String)(source)

Renames the property from oldName to newName.

Requires that there is not already a property with newName. If there is no property with oldName, nothing happens. If there are multiple properties with oldName, they are all renamed to newName.