xml parsing - SED - stripping certain tags from XML file -


i have xml files littered tags this:

<?xm-insertion_mark_start author="some_author" time="20050602t125956-0500"?>   

how strip such inserts? i've tried avail:

sed -e 's/<\?xm.*?\?>//g' in.xml > out.xml 

instead of substitute (s) use delete (d) command of sed:

also use sed -i (inline) this:

sed -i.bak '/<?xm.*?>/d' in.xml 

using grep:

grep -v '<\?xm.*\?>' in.xml > out.xml 

caution: shell utilities not best tools parsing & editing xml data.


Comments

Popular posts from this blog

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -

R summary function in ddply (plyr) in a simple way -

c# - Are delegates created via lambda expressions guaranteed to be cached? -