![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to remove all except one file? | praveen_b744 | UNIX for Dummies Questions & Answers | 5 | 03-01-2009 02:56 PM |
| Remove the contents of a file without deleting the file | sumesh.abraham | Shell Programming and Scripting | 10 | 12-02-2006 05:35 PM |
| How do i remove the unneccesary output ? | Raynon | Shell Programming and Scripting | 2 | 09-18-2006 10:00 PM |
| help to remove file | ranj@chn | UNIX for Dummies Questions & Answers | 2 | 06-16-2006 04:03 AM |
| help:how to remove headers in output file | raj_thota | UNIX for Dummies Questions & Answers | 1 | 10-21-2005 06:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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".
Code:
sed 's% xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"%%' old.xml >new.xml |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|