ATOMWriter for NodeJS
ATOMWriter is small class, that provides methods to generate an ATOM feed. XML is still valid by using XMLWriter
Contributors
Installation
With npm do:
$ npm install atom-writer
Examples
Basic
var XMLWriter = var ATOMWriter = xw = trueaw = xw aw aw aw aw console
Output:
urn:xxx:yyy 2012-07-02T15:22:40Z 1 10 100 Index of / urn:xxx:yyy-1 2012-07-02T15:22:40Z 2012-07-02T15:22:40Z Data 1 Un Tata Toto toto@exemple.com urn:xxx-yyy-2 2012-07-02T15:22:40Z 2012-07-02T15:22:40Z Data 2 deux titi.toto titi.toto@exemple.com
API Documentation
construct (XMLWriter o)
flush()
startFeed(String id, Date updated = null, Date created = null)
writeTitle(String value, String type = 'text', String lang = null)
writeLink(String value, String type = 'text/html', String rel = null)
writeAuthor(String name, String email = null, String uri = null)
writeAuthorRAW(String value)
writeContributor(String name, String email = null, String uri = null)
writeCategory(String term, String scheme = null, String label = null)
writeSummary(String value, String type = null)
startEntry(String id, Date updated = null, Date created = null)
writeContent(String value, String type = null, String lang = null)
endEntry()
endFeed()
writeSearch(String url)
writeTotalResults(String value)
writeStartIndex(String value)
writeItemsPerPage(String value)
writeQuery(String searchTerms, Number startPage = 1, String role = 'request')
writeGenerator(String value, String version = null, String uri = null)
Also
- http://dojotoolkit.org/reference-guide/1.7/dojox/atom/io/model.html
- https://github.com/wezm/node-genx