The UNIX and Linux Forums  

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
Removing empty folders using 'find' deTTo UNIX for Dummies Questions & Answers 5 04-21-2008 10:24 PM
Removing spaces between XML tags<XX XX> -> <XXXX> sharoff UNIX for Dummies Questions & Answers 8 04-10-2008 11:48 AM
removing html tags via parameter expansion rev66 Shell Programming and Scripting 2 03-14-2008 12:26 PM
How to empty a file without removing it. jxh461 UNIX for Dummies Questions & Answers 8 06-01-2007 10:45 AM
Removing leading and trailing spaces of data between the tags in xml. jhmr7 UNIX for Dummies Questions & Answers 2 05-18-2005 11:27 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-06-2008
vijayhai vijayhai is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 2
removing empty tags

Hi,

I have a file as shown below.
<crown:clinicalData>
<crown:alb date="2008-07-10" lowValue="3.50" method="BCG" value="3.50"/>
<crown:cre date="2008-07-10" value="9.5"></crown:cre>
<crown:ktvHdAd>
</crown:ktvHdAd>
<crown:ktvPdAd>
</crown:ktvPdAd>
</crown:clinicalData>


I want to remove the empty tags. i.e I want to remove

<crown:ktvHdAd>
</crown:ktvHdAd>

and

<crown:ktvPdAd>
</crown:ktvPdAd>

If it happens to have records in between the tags, then I do not want to delete.

Can any of you know good approaches to it?

Thanks
Vijay
 

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 08:36 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