XML and RSS libraries. Single and dual-file respectively.
https://jsr.io/@memdmp/rsstrogen@latest/doc/all_symbols
- TypeScript 98.4%
- Shell 1.6%
Based on |
||
|---|---|---|
| contrib | ||
| examples | ||
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| deno.json | ||
| deno.lock | ||
| LICENSE | ||
| README.md | ||
rsstrogen
A RSS and XML generation library. Built for my blog, usable elsewhere.
examples
A simple XML document:
import { XMLDocumentRoot, XMLRootElement, XMLElement, XMLDeclaration, XMLText } from 'jsr:@memdmp/rsstrogen/xml'; // npm:rsstrogen/xml also works, and so does `rsstrogen/xml` when installed from npm.
const doc = new XMLDocumentRoot().append(
new XMLDeclaration().version().encoding('UTF-8'),
new XMLRootElement('cat')
.setAttribute('colour', 'orange')
.append(
new XMLElement('head').append(new XMLText('1 braincell')),
)
);
console.log(doc.toString());
A simple RSS feed:
const doc = new XMLDocumentRoot().append(
new XMLDeclaration().version().encoding(),
new RSSRootElement()
.channel(
new RSSChannelElement(
'Blog Posts',
'Some Description Here',
'https://example.com/blog/'
)
.pubDate(new Date('2001-09-11T08:46:40Z'))
.lastBuildDate(new Date())
.language('en')
.items(
new RSSItemElement(
'Lorem Ipsum',
'Ipsum de Lorem',
'https://example.com/blog/123456-awawa',
)
.author('[email protected] (Max Musterfrau)')
.guid('https://example.com/blog/123456', true)
.pubDate(new Date('2001-09-11T08:46:40Z')),
)
)
);
console.log(doc.toString());