I do not see any error, you forgot to post it.
To update an xml node, you use update with xmlquery, like the example shown in the Oracle documentation here:
I gave you so many examples and you still not paying any attention on how to update XML in Oracle:
SET XMLCOL = XMLQuery(
'copy $NEWXML := $XML
for $A4 in $NEWXML/row/a4[@m="87" and text()="20180102"]
replace value of node $A4 with $D
PASSING XMLCOL AS "XML",
'20180101' AS "D"
'/row/a4[@m="87" and text()="20180102"]'