Page 1 of 1

How to Remove beginning xml to ending xml tags?

Posted: Mon Aug 17, 2009 5:06 pm
by karipay
Hi I have this XML and would like to remove one element. Can anyone please help me.

Example. I want to remove tag2.
<tag1>abcde</tag1>
<tag2>fghij</tag2>
<tag3>klmno</tag3>

so my output should be like this.
<tag1>abcde</tag1>
<tag3>klmno</tag3>

Thanks in advance!

Posted: Tue Aug 18, 2009 1:27 am
by Bob Hansen
Search for : <tag2>.*</tag2>
Replace with: NOTHING

Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------

Posted: Tue Aug 18, 2009 3:25 pm
by karipay
This worked! Thanks a lot!