I have a requirement where I need to read a XML file and replace the tag that contains /
, "
and save it as a new file.
The original tag format:
<CollateralReportDocument xmlns="http://schemas.foo.com/sII/CollateralReportDocument/1.0">
The new file should have the tag as:
<CollateralReportDocument>
I have tried using
Sed -i 's/<CollateralReportDocument xmlns="http://schemas.foo.com/sII/CollateralReportDocument/1.0">
/ <CollateralReportDocument>/g' filename.xml
...but it is not working. Can you help me with this?