Search and Replace a string pattern with empty in an xml file in unix:
My xml file would be like this :
<Accounts><Name>Harish</Name><mobile>90844444444444445999 </mobile><TRIG>srcujim-1</TRIG></Accounts><Accounts><Name>Satish</Name><mobile>908999</mobile><TRIG>ettertrtt-1</TRIG></Accounts>
I basically need to search for the tag starting with <TRIG> and ending with </TRIG>. The intermediate sting data between these 2 stings may be upto length of 255 chars.
and i need to replace the entire string pattern with empty.
For ex : <TRIG>srcujim-1</TRIG> to empty and
<TRIG>ettertrtt-1</TRIG> to empty.
So my final output ml shud look something like this :
<Accounts><Name>Harish</Name><mobile>90844444444444445999</mobile></Accounts><Accounts><Name>Satish</Name><mobile>908999</mobile></Accounts>
There might be several such string patterns or tags in this xml and i need to remove all the tags from my xml.
Please help me to achieve this.