Temrs and objects



Terms

Channel — something (template + config) that provide full-text RSS feed.
Template — part of the Channel, describe how to get Channel's content.
Channel's article — content element of the Channel: news, articles, reviews and so on.
Channel's update — process of getting fresh articles.

Objects

There are some objects that you can use within your templates.

Channel — represents one channel

url [string] — URL to RSS feed or "regular" HTML page.
name [string] — name of the Channel.
encoding [string] — encoding of source pages.
articles [ArticleCollection] — collection of articles.

ArticleCollection — represents a collection of Channel's articles

length [int] — length of the collection.
push(Article article) [void] — add new item to collection.

Article — represents one article

id [string] — identifier of the Article. Must be unique within ArticleCollection to avoid rewriting.
url [string] — URL of original article.
header [string] — Article's header.
body [string] — Article's full text.
date [DateTime] — Article's publication date.

Node — represents one node from HTML document

nodeName [string] 
outerHTML [string] 
innerHTML [string] 
outerText [string] 
innerText [string] 
firstChild [Node] 
lastChild [Node] 
nextSibling [Node] 
previousSibling [Node] 
parentNode [Node] 
childNodes [NodeCollection] 
attributes [AttributeCollection] 
xpath() [string] 
getAttribute(string attributeName) [string] 
getElementsByTagName(string name) [NodeCollection] — find elements by tag name (within this Node).
getElementsById(string name) [NodeCollection] — find elements by id (within this Node).
getElementsByClassName(string name) [NodeCollection] — find elements by class name (within this Node).
getElementsByAttr(string tagname, string attrname, string attrvalue) [NodeCollection] — find elements by attribute value (within this Node).

NodeCollection - represents a collections of Nodes

length [int] — length of the collection.
this[int index] [Node] — get element by index.

Document — represents a HTML document

Document(string url, string encodingName) — constructor.
Document(string url) — constructor.
nodeName [string] — Node's type.
outerHTML [string] — Node's outer HTML.
innerHTML [string] — Node's inner HTML.
firstChild [Node] — Node's first child.
lastChild [Node] — Node's first child.
nextSibling [Node] — Node's next sibling node
previousSibling [Node] — Node's previous sibling node
parentNode [Node] — Node's parent (node or document).
childNodes [NodeCollection] — Node's child collection.
attributes [AttributeCollection] — Node's attributes.
getAttribute(string name) [string] — get attribute by it's name.
getElementsByTagName(string name) [NodeCollection] — find elements by tag name.
getElementsById(string name) [NodeCollection] — find elements by id.
getElementsByClassName(string name) [NodeCollection] — find elements by class name.
getElementsByAttr(string tagname, string attrname, string attrvalue) [NodeCollection] — find elements by attribute value.
getElementsByXPath(string xPath) [NodeCollection] — find elements by xPath.