Very strange... I did not edit the blue word in there, and it doesn't tell me which moderator did this or why.
I meant 'worse' in that if you know anything about awk and xml, you'll know they aren't suitable for each other, but we keep getting asked anyway.
---------- Post updated at 10:40 AM ---------- Previous update was at 10:35 AM ----------
Right now it can do this:
$ ./mox < cnn_topstories.rss /item/title 2> /dev/null
<title>Satellite expected to hit Earth this weekend</title>
<title>Libyan elections 'coming within months'</title>
<title>NATO to end mission by Oct. 31</title>
<title>What next?</title>
<title>Gadhafi's demise and the Arab Spring</title>
<title>Ahmadinejad: U.S. hated around world</title>
<title>Heir to Saudi throne dies in New York</title>
<title>At least 9 killed in Yemen clashes</title>
<title>China in mourning after toddler's death</title>
<title>Tunisia set for first Arab Spring election</title>
$
IOW, pretty much the same as my OP. But the parser is much better now.
I intend to release it into the public domain should I come up with anything useful.
I'm adopting some parts of the xpath syntax but don't think I'll implement the whole thing the same way. A lot of it does not apply.
Though I should check out this xmlgawk and see if it will do what I want.
---------- Post updated at 12:01 PM ---------- Previous update was at 10:40 AM ----------
xmlgawk refused to run properly unless actually installed, no way to test it without that.
It needed library files teased into random places by hand, make install didn't bother installing extensions -- like the xml one. The INSTALL and README's were still the useless generic ones.
Its XML parser is pointlessly strict. Feeding it a webpage inevitably causes it to die with "mismatched tag" before it bothers processing any data at all.
Their first trivial example didn't work at all, I had to modify it into something it would.
Not impressed.