# Class: Rss20Writer

## jala.Rss20Writer(header)

Class to create, modify and render standard-compliant RSS 2.0 feeds.

## Constructor

#### new Rss20Writer(header)

##### Parameters:

Name | Type | Description
--- | --- | ---
`header` | String | Optional XML header.

Source:
  - jala/code/Rss20Writer.js, line 49

### Extends

- jala.XmlWriter

### Methods

#### addCategory(name, domain, parent)

Add a category element to an arbitrary element.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | The name of the category.
`domain` | String | The domain of the category.
`parent` | jala.XmlWriter.XmlElement | The optional parent element.

Source:
  - jala/code/Rss20Writer.js, line 299

#### addItem(item)

Add an item element to the channel element.

##### Parameters:

Name | Type | Description
--- | --- | ---
`item` | jala.XmlWriter.XmlElement | The item element to add.

Source:
  - jala/code/Rss20Writer.js, line 288

#### addNamespace(name, url)

Add a namespace to this writer.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | The name of the namespace.
`url` | String | The URL string of the namespace.

Inherited From:
  - jala.XmlWriter#addNamespace
Source:
  - jala/code/XmlWriter.js, line 313

##### Returns:

The XML root element.

#### clone(The)

Clone this XML writer.

##### Parameters:

Name | Type | Description
--- | --- | ---
`The` | Object | clone templare.

Inherited From:
  - jala.XmlWriter#clone
Source:
  - jala/code/XmlWriter.js, line 349

##### Returns:

The cloned XML writer.

#### createElement(data)

Get a newly created XML element.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | The XML data as object tree.

Inherited From:
  - jala.XmlWriter#createElement
Source:
  - jala/code/XmlWriter.js, line 276

##### Returns:

The resulting XML element.

#### createItem(data)

Get a new and innocent item element.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | An XmlWriter-compliant object structure.

Source:
  - jala/code/Rss20Writer.js, line 278

##### Returns:

A new and innocent item element.

#### extend(template, ext)

Extend a template object.

##### Parameters:

Name | Type | Description
--- | --- | ---
`template` | Object | The template object.
`ext` | Object | The extension object.

Inherited From:
  - jala.XmlWriter#extend
Source:
  - jala/code/XmlWriter.js, line 296

##### Returns:

The XML writer.

#### extendChannel(ext)

Add child elements to the channel template.

##### Parameters:

Name | Type | Description
--- | --- | ---
`ext` | Array | List of additional child elements.

Source:
  - jala/code/Rss20Writer.js, line 237

#### extendItem(ext)

Add child elements to the item template.

##### Parameters:

Name | Type | Description
--- | --- | ---
`ext` | Array | List of additional child elements.

Source:
  - jala/code/Rss20Writer.js, line 267

#### getChannel()

Get the writer's channel element.

Source:
  - jala/code/Rss20Writer.js, line 249

##### Returns:

The writer's channel element.

#### getRoot()

Get the writer's root element.

Overrides:
  - jala.XmlWriter#getRoot
Source:
  - jala/code/Rss20Writer.js, line 229

##### Returns:

The writer's root element.

#### setChannel(data)

Populate the channel element with data.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | An XmlWriter-compliant object structure.

Source:
  - jala/code/Rss20Writer.js, line 259

##### Returns:

The populated channel element.

#### setImage(data)

Populate the image element with data.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | An XmlWriter-compliant object structure.

Source:
  - jala/code/Rss20Writer.js, line 315

#### setTextInput(data)

Populate the textInput element with data.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | An XmlWriter-compliant object structure.

Source:
  - jala/code/Rss20Writer.js, line 326

#### toString()

Get the XML output as string.

Inherited From:
  - jala.XmlWriter#toString
Source:
  - jala/code/XmlWriter.js, line 337

##### Returns:

The XML output.

#### write()

Write the XML to the response buffer.

Inherited From:
  - jala.XmlWriter#write
Source:
  - jala/code/XmlWriter.js, line 325