Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

866.Regular expression replace -- How to remove the xml tag and some duplicated tags of combined xml files?

User: editor -- 2011-10-06          << 865  867 >>
Hits: 2721
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How to remove the xml tag and some duplicated tags of combined xml files? 
Many xml files are joined together into one big xml file, but there are duplicated xml tags and top level figure tags, how to remove the duplicated ones?
Input Sample:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> 
<figure chapnbr="24" ...> 
<first part ...> 
</figure> 
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> 
<figure chapnbr="24" ...> 
<second part ...> 
</figure> 
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> 
<figure chapnbr="24" ...> 
<last part ...> 
</figure>
Output Sample:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> 
<figure chapnbr="24" ...> 
<first part ...> 
<second part ...> 
... 
<last part ...> 
</figure>
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open the combined xml files 
2. ctrl-h open 'replace' dialog 
* set 'search for pattern' to: 
 
3. click 'replace', done. 
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to remove all lines with duplicate value in column B in CSV file? (64%)
How to remove duplicate lines from a text file? (62%)
How to remove consecutive duplicate words in multiple files? (62%)
How to remove all lines that have duplicate contents in CSV files? (62%)
How to remove partially duplicated lines in a text file? (61%)
How to add bold tag for some specified keywords in multiple html files? (60%)
How to remove the timestamps at the start of line in lrc files? (60%)
How to change all bold tag to bold-italic tag in multiple html files? (60%)

Check Demo of Regular expression replace
Keywords:
big  level  combine  figure  xml files  xml  xml file  duplicated  together  tags  remove xml tag  search remove xml tags  xml files search and replace  remove tags  xml search replace  xml search and replace  replace xml  replace tags