I have test.xml XML file like
<Report account="123456" start_time="2014-09-08T00:00:00+00:00" end_time="2014-09-10T23:59:59+00:00" user="Dollar Tree" limit="1000000" more_sessions="some text ">
<Session ......rest of xml...............
I need output like
<Report>
<Session ......rest of xml...............
Can some one help me how to use of SED command to get the desired output..
Aia
2
sed -e 's/\(<Report\)[^>]*/\1/'
Hi,
Thanks for your reply..I have tried below command
sed -e 's/\(<Report\)[^>]*/\1/' test.xml
but i cannot see the output as
<?xml version="1.0" encoding="UTF-8"?>
<Report>
<Session ...>
The report tag description is not deleting ....I can see the same old output as
<?xml version="1.0" encoding="UTF-8"?>
<Report account="123456" start_time="2014-09-08T00:00:00+00:00" end_time="2014-09-10T23:59:59+00:00" user="Dollar Tree" limit="1000000" more_sessions="some text ">
<Session ......rest of xml...............
Aia
4
sed -e 's/^<Report.*$/<Report>/'