replaceChild

open fun replaceChild(@NonNull name: String, @Nullable value: String): Boolean

Replace a child.

If no such child exists, a new child is created.

Compared to setChildValue, this will remove also all attributes and children of that child.

Return

true if an existing child was replaced or false if a new child was added.

Parameters

name

The child's name.

value

The child'd value.


open fun replaceChild(@NonNull child: Xml): Boolean

Replace a child.

If no such child exists, a new child is created.

Compared to setChildValue, this will remove also all attributes and children of that child.

Return

true if an existing child was replaced or false if a new child was added.

Parameters

child

The child.