RSS Feed to JSON
RSS feed XML converts to a structured JSON object, making it easy to process feed items programmatically.
Switch tool:
Examples:
JSON output will appear here...
💡 Paste your XML and it converts to JSON automatically. Attributes are prefixed with @ and text content uses #text.
Code Examples
Here's how to achieve this in different programming languages:
1// Using DOMParser (browser) or xml2js (Node.js)2const xmlString = `<rss version="2.0">3 <channel>4 <title>My Blog</title>5 <item>6 <title>First Post</title>7 <link>https://example.com/1</link>8 </item>9 </channel>10</rss>`;1112// Browser13const parser = new DOMParser();14const doc = parser.parseFromString(xmlString, 'text/xml');1516// Node.js with xml2js (npm install xml2js)17const xml2js = require('xml2js');18const parser = new xml2js.Parser();19parser.parseString(xmlString, (err, result) => {20 console.log(JSON.stringify(result, null, 2));21});2223// Output:24// {25// "rss": {26// "@version": "2.0",27// "channel": {28// "title": "My Blog",...
More XML Examples
Simple XML to JSON
Basic XML element conversion to JSON object.
XML Attributes to JSON
XML elements with attributes converted to JSON with @ prefixed properties.
Nested XML to JSON
Deeply nested XML structures converted to nested JSON objects.
SOAP Response to JSON
Transform SOAP web service responses to JSON format.
XML Config to JSON
Transform XML configuration files to JSON format.