async function fetchRSSFeed(url) { try { const response = await fetch(url); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const rssText = await response.text(); console.log(rssText); // Output raw XML text } catch (error) { console.error('Error fetching RSS feed:', error); } } // Example RSS feed URL const rssUrl = 'https://example.com/rss'; fetchRSSFeed(rssUrl); |