in reply to Re: extract tag form xml file
in thread extract tag form xml file

I just realized that xml is the mark-up language of the monastery. Am I replicating your result?

$ cat 1.murugan.xml <inline-formula id="ieqn-1"><alternatives><mml:math display="inline">< +mml:mi>&#964;</mml:mi></mml:math></alternatives></inline-formula> <inline-formula id="ieqn-2"><alternatives><mml:math display="inline">< +mml:mi>&#964;</mml:mi></mml:math></alternatives></inline-formula> <inline-formula id="ieqn-3"><alternatives><mml:math display="inline">< +mml:mi>&#964;</mml:mi></mml:math></alternatives></inline-formula> $ perl -F\" -ne 'print "$F[1].mml\n"' 1.murugan.xml ieqn-1.mml .mml ieqn-2.mml .mml ieqn-3.mml $

Replies are listed 'Best First'.
Re^3: extract tag form xml file
by hippo (Archbishop) on Dec 04, 2018 at 09:06 UTC

    Indeed you are. The difference in output is due to a difference in input only. You have assumed that every other line of input is blank whereas I assumed those were just attempts by Murugan to separate the lines in markup since for some reason they (unlike you) did not enclose their data in <code> tags.

    I did say it was tremendously fragile.