4 Replies Latest reply: Mar 27, 2014 5:02 AM by 862739 RSS

    To update XML using shell script

    862739

      Hello,

      I have an xml file like below: I want to add an entry in the xml using shell script. Can someone help me here please.

       

      <cluster

          generic-jvm-arguments="-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote"

          bootstrap-port="8003"

          http-port="7003"

          number-of-servers-per-node="1"

          minimum-heap-size="256"

          node-list="node.net"

          session-cookie-name="SessionID"

      >

      </cluster>

       

       

      I want to add below line in xml as

      node-restart="RUN"

      this entry should come below line node-list="node.net"

       

      Output should look as:

      <cluster

          generic-jvm-arguments="-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote"

          bootstrap-port="8003"

          http-port="7003"

          number-of-servers-per-node="1"

          minimum-heap-size="256"

          node-list="node.net"

          node-restart="RUN"

          session-cookie-name="SessionID"

      >

      </cluster>

       

      Thanks in advance.