The "replace value of" works well if the element contains text but if you use this with an untyped xml document and the element is empty it does not work. This is probably by design but could you please provide an example if the most efficient way to update an element even if it is empty? Im guessing we would somehow have to use .exists but an example would clarify.