How to replace value in XML data coming from JSON and make the axios POST call

I have XML data coming in from JSON as shown below:

"salesToolQueryMessageTemplate": "<ns0:OpenConfigurationRequest xmlns:stdTypes="http://www.assaabloy.com/configurator/schema/standardtypes/v0.1" xmlns:ns0="http://www.assaabloy.com/configurator/schema/openconfiguration/v0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.assaabloy.com/configurator/schema/openconfiguration/v0.1 file:/C:/apache-tomcat-6.0.33/webapps/AssaAbloyConfiguratorSchemas/InfoModel/Configurator/CmfIniOpenConfiguration/CmfIniOpenConfigurationRequestMessage_0001.xsd">n<ns0:OpenConfigRequestHeader>n${config}n<stdTypes:StorefrontKey>99001</stdTypes:StorefrontKey>n</ns0:OpenConfigRequestHeader>n<ns0:LanguageCode>${locale}</ns0:LanguageCode>n<ns0:RedirectURL>n<![CDATA[ https://normstahl.com/de/examplepage123?quantity=1&catalogId=53090287&storeId=22101&langId=&orderId=.**.&cancelUrl=https://normstahl.com/de/exampleexample/examplepage.html?___store=normstahl_de ]]>n</ns0:RedirectURL>n</ns0:OpenConfigurationRequest>"

In the above xml data I need to replace ${confiwith} with some XML configuration. Later the same XML is to shared via a POST call encoding < to < and > to >

Please suggest.

I am not able to replace the values in XML and encode the < and > sign. Tried React XML Parser but were not able to achieve the end results.