xquery version "3.0" encoding "utf-8"; (: We use unparsed-text(url, encoding) instead of doc(url) because xidel does not support changing the encoding dynamically depending on the HTML content, so it would always use UTF-8 :) x:parse-html(unparsed-text("https://www.nhc.noaa.gov/aboutrss.shtml", "iso-8859-1"))/ National Hurricane Center and Central Pacific Hurricane Center RSS feeds {format-dateTime(adjust-dateTime-to-timezone(current-dateTime(), xs:dayTimeDuration("PT0S")), "[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] GMT")} lucidiot lucidiot@envs.net https://tilde.town/~lucidiot/contact.html http://dev.opml.org/spec2.html { (: Each feed is listed as a link with an RSS icon inside it, followed by a text node representing the feed name, followed by another link with the URL as its text. Start by picking the link with the image in it… :) for $feed in //a[ends-with(@href, ".xml")][./img] (: Find the text node that follows the image to get the feed name :) let $text := substring-before($feed/following-sibling::text()[1], ":") return (: The only way to determine the feed's language without fetching the feeds themselves is to look for Spanish keywords. :) }