Condtionally remove section of XML file

Enquith

New Member
I am looking for a solution to this problem and suspect awk should provide a simple enough solution instead of my clumsy shell script. I have an xml file consisting of multiple sections as shown below. I also have a list of values.For each section \[code\]<top_tag> ... </top_tag>\[/code\] where value_x is in my list, delete (ie:not print) the section \[code\]<top_tag> ... </top_tag>\[/code\]\[code\]<xml><outer_tag> <top_tag> <tag>value_1</tag> <other_tags></other_tags> </top_tag> <top_tag> <tag>value_2</tag> <other_tags></other_tags> </top_tag> ... <top_tag> <tag>value_n</tag> <other_tags></other_tags> </top_tag></outer_tag>\[/code\]Your suggestions are most appreciated.
 
Back
Top