Replacing data between XML tags

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
wdfreemanjr
Posts: 1
Joined: Wed Feb 09, 2011 6:38 pm

Replacing data between XML tags

Post by wdfreemanjr »

I need to remove all data between the <sso:Value> tags. Data can be alpha and/or numeric of varying lengths and formats. The entire document is contained on a single line

Starting Value
<sso:Value>Data</sso:Value><sso:Value>Data</sso:Value>

Ending Value
<sso:Value></sso:Value><sso:Value></sso:Value>
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

If there are no tags within the <sso:Value> elements, try:

Search | Replace... (<F8>):
Find what: <sso:Value>[^<]*</sso:Value>
Replace with: <sso:Value></sso:Value>

[X] Regular expression

Replace All
Post Reply