1.0.0 • Published 9 years ago

sitemap-writer v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

SitemapWriter for Node.js

Based on XMLWriter (Inist-CNRS/node-xml-writer)

Installation

npm install sitemap-daemon

Example

import {SitemapWriter} from 'sitemap-writer'

var w = new SitemapWriter();
w.startDocument()
w.startURLSet();
w.writeURL({loc: '/'});
w.startURL({loc: '/abc'});
w.writeImage({loc: '/img/1.jpg'});
w.endURL();
w.endURLSet();
w.endDocument();

console.log('sitemap: %s', w.toString());