syndication/rss2
Syndication::RSS2::Parser Class Reference
#include <parser.h>
Inherits Syndication::AbstractParser.
Detailed Description
Parser implementation for the RSS 0.9x/2.0 format family.
Definition at line 42 of file parser.h.
Public Member Functions | |
bool | accept (const DocumentSource &source) const |
QString | format () const |
Syndication::SpecificDocumentPtr | parse (const DocumentSource &source) const |
Parser () | |
virtual | ~Parser () |
Constructor & Destructor Documentation
Syndication::RSS2::Parser::Parser | ( | ) |
Syndication::RSS2::Parser::~Parser | ( | ) | [virtual] |
Member Function Documentation
bool Syndication::RSS2::Parser::accept | ( | const DocumentSource & | source | ) | const |
checks whether a document source looks like an RSS0.9x/2.0 document
- Parameters:
-
source a document source to check
- Returns:
true
if the source looks like an RSS2 document
QString Syndication::RSS2::Parser::format | ( | ) | const |
returns the format string of this parser implementation, which is "rss2".
- Returns:
"rss2"
Definition at line 53 of file parser.cpp.
Syndication::SpecificDocumentPtr Syndication::RSS2::Parser::parse | ( | const DocumentSource & | source | ) | const |
creates an RSS2 wrapper for a document source.
The wrapper will only return useful values if the source is really RSS 0.9x/2.0, so call accept() before to check.
- Parameters:
-
source the source to wrap
- Returns:
- A Syndication::RSS2::Document instance wrapping the XML source, or a null document (not a null pointer!) if there is no
<channel>
root element in the source.
Definition at line 48 of file parser.cpp.
The documentation for this class was generated from the following files: