I have the following xml in a string.
<field1 param1="value" hun="true">
<field2 hun="true">
<field3 param2="value" hun="true">
I want to find every instance of hun="true"> and add another xml field <newxml value="number"> So my xml would look like this
<field1 param1="value" hun="true">
<newxml value="number">
<field2 hun="true">
<newxml value="number">
<field3 param2="value" hun="true">
<newxml value="number">
maybe you could do a simple string replace on the string, replacing every instance of ‘hun=”true”‘ with
'hun="true"><newxml value="number">'