Subscribe: parsing application/atom+xml in html page - Stack Overflow
http://stackoverflow.com/feeds/question/1822138
Preview: parsing application/atom+xml in html page - Stack Overflow

parsing application/atom+xml in html page - Stack Overflow



most recent 30 from stackoverflow.com



Updated: 2018-04-22T22:31:46Z

 



parsing application/atom+xml in html page

2009-11-30T20:22:33Z

we know that all blog show his blog 's rss feed by


but are you know any regex to get feedurl from this





Answer by Welbog for parsing application/atom+xml in html page

2009-11-30T20:22:33Z

Use an XPath query like this one:

//link[@type='application/rss+xml']/@href

It'll pull out any RSS feed URL for you. Never parse XML or HTML with regular expressions, ever. XPath is specifically designed to query XML and HTML easy for you. It's available in nearly every technology stack, including .NET.

XML is not regular, and so regex is the incorrect tool to parse it.