The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-26-2008
ca_sr2274 ca_sr2274 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
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.
  #2 (permalink)  
Old 08-27-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0