I have a OPML file that I would like to parse the links and names in order to create a HTML formatted list.
<outline text="Wired Features" type="rss" xmlUrl="http://downloads.wired.com/podcasts/xml/features.xml?_kip_ipx=1854665749-1310493405" htmlUrl="http://www.wired.com" />
<outline text="ArcSight Podcasts" type="rss" xmlUrl="http://www.arcsight.com/podcasts/itunes/" htmlUrl="http://www.arcsight.com" />
Using SED or something similar I would like the print the items in a respective HTML output, i.e
<a href="http://downloads.wired.com/podcasts/xml/features.xml?_kip_ipx=1854665749-1310493405" title="http://www.wired.com">Wired Features</a>
Assuming there are no embedded newlines in the interested parts.
With XMLgawk:
Edit: the Perl solution could be rewritten with a single regex: