Hi all,
I need to replace string in XML file..XML file like
<dependency>
<groupId>fr.orange.portail.ear</groupId>
<artifactId>_AdminServicesEAR</artifactId>
<version>1.0.0-20080521.085352-1</version>
<type>ear</type>
</dependency>
<dependency>
<groupId>fr.orange.portail.ear</groupId>
<artifactId>_AdminServicesEAR</artifactId>
<version>1.0.0-20080521.085352-1</version>
<type>ear</type>
</dependency>
I need to replace the value between <type> </type> tag at first occurance. i am using following sed command now but it is replacing the tag value globally
sed 's#<type>\([^<][^<]*\)</type>#<type>newvalue</type>#' application.xml > application.xml.new
Can anyone gelp me ....
Thanks and Regards,