Syndication::RSS2::Parser

Search for usage in LXR

Syndication::RSS2::Parser Class Reference

#include <parser.h>

Inheritance diagram for Syndication::RSS2::Parser:

Public Member Functions

 Parser ()
 
 ~Parser () override
 
bool accept (const DocumentSource &source) const override
 
QString format () const override
 
Syndication::SpecificDocumentPtr parse (const DocumentSource &source) const override
 
- Public Member Functions inherited from Syndication::AbstractParser
virtual ~AbstractParser ()
 

Detailed Description

Parser implementation for the RSS 0.9x/2.0 format family.

Author
Frank Osterfeld

Definition at line 29 of file rss2/parser.h.

Constructor & Destructor Documentation

◆ Parser()

Syndication::RSS2::Parser::Parser ( )

default constructor

Definition at line 46 of file rss2/parser.cpp.

◆ ~Parser()

Syndication::RSS2::Parser::~Parser ( )
overridedefault

destructor

Member Function Documentation

◆ accept()

bool Syndication::RSS2::Parser::accept ( const DocumentSource & source) const
overridevirtual

checks whether a document source looks like an RSS0.9x/2.0 document

Parameters
sourcea document source to check
Returns
true if the source looks like an RSS2 document

Implements Syndication::AbstractParser.

Definition at line 24 of file rss2/parser.cpp.

◆ format()

QString Syndication::RSS2::Parser::format ( ) const
overridevirtual

returns the format string of this parser implementation, which is "rss2".

Returns
"rss2"

Implements Syndication::AbstractParser.

Definition at line 41 of file rss2/parser.cpp.

◆ parse()

Syndication::SpecificDocumentPtr Syndication::RSS2::Parser::parse ( const DocumentSource & source) const
overridevirtual

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
sourcethe 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.

Implements Syndication::AbstractParser.

Definition at line 36 of file rss2/parser.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.