I need help in finding and replacing a value in xml node using JQuery, please suggest, below is my scenario,
var metaData ='<Control Type="Table" ID="4900a2a9-47d7-4d3b-9a35-fdd32b185730"></Control>
<Control Type="TextBox" ID="7a499af6-16c1-4fe8-9ea0-fe02e7eef886"></Control>';
in the above xml structure I want to search for ID="4900a2a9-47d7-4d3b-9a35-fdd32b185730" and replace it with ID="91e3cbe6-8168-40be-bf26-ccdd6acb1e17" in JQuery. Please suggest.
Below is what I tried,
var oldID = "4900a2a9-47d7-4d3b-9a35-fdd32b185730";
var newID = "91e3cbe6-8168-40be-bf26-ccdd6acb1e17";
metaData.replace(oldID, newID);
the above code was not successful.