0

Below is part of my input xml file. i am searching for ignore word and want to delete all lines between and including instance line.

<instance:default>
<action> ignore </action>
<group>
    /apps
    /test123
    /mnt/abc
</group>

abctx007
  • 29
  • 5
  • 2
    IMHO experts always advice to parse XML files with tools who could understand xmls well. awk, sed are not encouraged much in this IMHO. – RavinderSingh13 May 04 '20 at 04:45
  • A valid XML file and the expected resulting valid XML file would be useful to include so we can see what you want to remove. – Shawn May 04 '20 at 08:33
  • Some call it [summoning the daemon](https://www.metafilter.com/86689/), others refer to it as [the Call for Cthulhu](https://blog.codinghorror.com/parsing-html-the-cthulhu-way/) and few just [turned mad and met the Pony](https://stackoverflow.com/a/1732454/8344060). In short, never parse XML or HTML with a regex! Did you try an XML parser such as `xmlstarlet`, `xmllint` or `xsltproc`? – kvantour May 04 '20 at 09:02

0 Answers0