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

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -