Remove xmlns from xml output file

Hi,
I have the xml output file which contents the namespace xmlns.

I would like to remove that line

<AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Table1>
<Data1 10 </Data1>
<Data2 20 </Data2>
<Data3 40 </Data3>
<Table1>
</AutoData>

I would like to remove line xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance\)

can somebody please help me to find out the correct shell script.

Thanks in advance.

Remove the line, or remove that fragment from the line? Removing the line renders the structure incomplete, as you will be left with a closing /AutoData without a corresponding opening tag. That could be fixed by removing the closing tag too, of course, but then again that might violate the DTD. Let's assume you mean "remove the fragment".

sed  's% xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"%%' old.xml >new.xml