none
Replace xml all node values when it contains certain value RRS feed

  • Question

  • Hi,

    i'm having xml data, in which i need to query the xml  and replace the node value  particular string alone  if it contains that string.

    "<?xml version=""1.0"" encoding=""utf-8""?>
    <root>
       <data name=""Name1"" xml:space=""preserve"">
        <value>Node {0} contain {1} attribute. Processing of file {2} terminated.</value>
      </data>
      <data name=""Name2"" xml:space=""preserve"">
        <value>Attribute '{0}' Test Data from node '{1}'.</value>
      </data>
      <data name=""Name3"" xml:space=""preserve"">
        <value>Attribute '{0}' Test Data from node '{1}'.</value>
      </data>
    </root>
    </xml>"

    in the above xml i need to replace the string "Test Data" with "Sample Data" in what ever nodes of the xml data


    - David


    Tuesday, May 21, 2019 11:15 AM

All replies