FoodCandy!

RssWriter Class Reference

Writes an RSS XML file. More...

List of all members.


Public Member Functions

 RssWriter (TextWriter textWriter)
 Creates an instance of the RssWriter class using the specified TextWriter.
 RssWriter (Stream stream, Encoding encoding)
 Creates an instance of the RssWriter class using the specified Stream and Encoding.
 RssWriter (Stream stream)
 Creates an instance of the RssWriter class using the specified Stream.
 RssWriter (string fileName, Encoding encoding)
 Creates an instance of the RssWriter class using the specified file and Encoding.
 RssWriter (string fileName)
 Creates an instance of the RssWriter class using the specified file.
void Close ()
 Closes instance of RssWriter.
void Write (RssChannel channel)
 Writes an RSS channel.
void Write (RssItem item)
 Writes an RSS item.

Properties

RssVersion Version
 Gets or sets the RSS version to write.
Formatting XmlFormat
 Gets or sets the System::Xml::Formatting of the XML output.
int XmlIndentation
 Gets or sets how indentation to write for each level in the hierarchy when XmlFormat is set to Formatting::Indented.
RssModuleCollection Modules
 RSS modules.

Detailed Description

Writes an RSS XML file.

Represents a writer that provides a fast, non-cached, forward-only way of generating streams or files containing RSS XML data that conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations.


Constructor & Destructor Documentation

RssWriter TextWriter  textWriter  ) 
 

Creates an instance of the RssWriter class using the specified TextWriter.

Parameters:
textWriter specified TextWriter

RssWriter Stream  stream,
Encoding  encoding
 

Creates an instance of the RssWriter class using the specified Stream and Encoding.

Exceptions:
ArgumentException The encoding is not supported or the stream cannot be written to.
Parameters:
stream Stream to output to
encoding The encoding to use. If encoding is (null c#, Nothing vb) it writes out the stream as UTF-8.

RssWriter Stream  stream  ) 
 

Creates an instance of the RssWriter class using the specified Stream.

The encoding is ISO-8859-1.

Exceptions:
ArgumentException The Stream cannot be written to.
Parameters:
stream specified Stream

RssWriter string  fileName,
Encoding  encoding
 

Creates an instance of the RssWriter class using the specified file and Encoding.

Exceptions:
ArgumentException The encoding is not supported; the filename is empty, contains only white space, or contains one or more invalid characters.
UnauthorizedAccessException Access is denied.
ArgumentNullException The filename is a (null c#, Nothing vb) reference.
DirectoryNotFoundException The directory to write to is not found.
IOException The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax.
System.Security.SecurityException The caller does not have the required permission.
Parameters:
fileName specified file (including path) If the file exists, it will be truncated with the new content.
encoding specified Encoding

RssWriter string  fileName  ) 
 

Creates an instance of the RssWriter class using the specified file.

The encoding is ISO-8859-1.

Exceptions:
ArgumentException The filename is empty, contains only white space, or contains one or more invalid characters.
UnauthorizedAccessException Access is denied.
ArgumentNullException The filename is a (null c#, Nothing vb) reference.
DirectoryNotFoundException The directory to write to is not found.
IOException The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax.
System.Security.SecurityException The caller does not have the required permission.
Parameters:
fileName specified file (including path) If the file exists, it will be truncated with the new content.

Member Function Documentation

void Close  ) 
 

Closes instance of RssWriter.

Writes end elements, and releases connections

Exceptions:
InvalidOperationException Occurs if the RssWriter is already closed or the caller is attempting to close before writing a channel.

void Write RssItem  item  ) 
 

Writes an RSS item.

Exceptions:
InvalidOperationException Either the RssWriter has already been closed, or the caller is attempting to write an RSS item before an RSS channel.
ArgumentNullException Item must be instanciated with data, before calling Write.
Parameters:
item RSS item to write

void Write RssChannel  channel  ) 
 

Writes an RSS channel.

Exceptions:
InvalidOperationException RssWriter has been closed, and can not be written to.
ArgumentNullException Channel must be instanciated with data, before calling Write.
Parameters:
channel RSS channel to write

Property Documentation

RssVersion Version [get, set]
 

Gets or sets the RSS version to write.

Exceptions:
InvalidOperationException Can't change version number after data has been written.

Formatting XmlFormat [get, set]
 

Gets or sets the System::Xml::Formatting of the XML output.

Exceptions:
InvalidOperationException Can't change XML formatting after data has been written.

int XmlIndentation [get, set]
 

Gets or sets how indentation to write for each level in the hierarchy when XmlFormat is set to Formatting::Indented.

Exceptions:
InvalidOperationException Can't change XML formatting after data has been written.
ArgumentException Setting this property to a negative value.

The documentation for this class was generated from the following file:
  • RssWriter.cs
© FoodCandy, 2006-2007, All Rights Reserved | FoodCandy | Sun Oct 7 10:48:52 2007 | Doxygen 1.4.6-NO